/* =====================================================
   724 Döviz - Converter Page Styles
   ===================================================== */

/* ==================== Page Header ==================== */
.page-header {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 50%, #f0f7ff 100%);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(26, 86, 219, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.page-title i {
    color: var(--primary-color);
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* ==================== Converter Section ==================== */
.converter-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.converter-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-2xl);
}

/* Main Converter */
.converter-main {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.converter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.converter-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.converter-header h2 i {
    color: var(--primary-color);
}

.converter-tabs {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
}

.converter-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.converter-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.converter-tab:hover:not(.active) {
    color: var(--text-primary);
}

.converter-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.converter-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-lg);
    align-items: end;
}

.converter-field {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.converter-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.currency-select {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.currency-select:hover {
    border-color: var(--primary-light);
}

.currency-select.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.currency-flag {
    font-size: 2rem;
    line-height: 1;
}

.currency-info-text {
    flex: 1;
}

.currency-code-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.currency-name-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.currency-chevron {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.amount-input-wrapper {
    position: relative;
}

.amount-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-right: 60px;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
}

.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.amount-currency {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.swap-currencies {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    margin-bottom: 20px;
}

.swap-currencies:hover {
    transform: rotate(180deg);
    box-shadow: var(--shadow-lg);
}

/* Result Box */
.converter-result-box {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-md);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-amount {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary-color);
}

.result-info {
    display: flex;
    justify-content: space-between;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.rate-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.rate-info strong {
    color: var(--text-primary);
}

/* ==================== Currency Modal ==================== */
.currency-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.currency-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--transition);
}

.currency-modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-search {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-search input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.currency-list {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.currency-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.currency-item:hover {
    background: var(--bg-secondary);
}

.currency-item.selected {
    background: rgba(26, 86, 219, 0.1);
}

.currency-item .currency-flag {
    font-size: 1.5rem;
}

.currency-item .currency-details {
    flex: 1;
}

.currency-item .currency-code {
    font-weight: 600;
    color: var(--text-primary);
}

.currency-item .currency-name {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.currency-item .currency-check {
    color: var(--primary-color);
    opacity: 0;
}

.currency-item.selected .currency-check {
    opacity: 1;
}

/* ==================== Popular Currencies ==================== */
.popular-currencies {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.popular-currencies h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.popular-currencies h3 i {
    color: var(--accent-gold);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.popular-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
}

.popular-item:hover {
    background: var(--bg-secondary);
}

.popular-item-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.popular-item .currency-flag {
    font-size: 1.25rem;
}

.popular-item .currency-pair {
    font-weight: 600;
    font-size: 0.875rem;
}

.popular-item .rate {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Sidebar ==================== */
.converter-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Quick Rates Widget */
.quick-rates-widget {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.quick-rates-widget h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quick-rates-widget h3 i {
    color: var(--primary-color);
}

.quick-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-rate-item:last-child {
    border-bottom: none;
}

.quick-rate-pair {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quick-rate-pair span {
    font-size: 1.25rem;
}

.quick-rate-pair strong {
    font-size: 0.875rem;
}

.quick-rate-value {
    text-align: right;
}

.quick-rate-value .rate {
    display: block;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.quick-rate-value .change {
    font-size: 0.75rem;
}

/* History Chart Widget */
.history-widget {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.history-widget h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.history-widget h3 i {
    color: var(--secondary-color);
}

.history-chart {
    height: 150px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.history-range {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.range-btn {
    flex: 1;
    padding: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.range-btn.active {
    background: var(--primary-color);
    color: white;
}

.range-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* ==================== All Currencies Table ==================== */
.all-currencies-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
}

.currencies-table-wrapper {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.currencies-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.currencies-table-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.table-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.table-search i {
    color: var(--text-muted);
}

.table-search input {
    border: none;
    background: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 200px;
}

.table-search input:focus {
    outline: none;
}

.currencies-table {
    width: 100%;
    border-collapse: collapse;
}

.currencies-table th,
.currencies-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.currencies-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.currencies-table tr:last-child td {
    border-bottom: none;
}

.currencies-table tr:hover {
    background: var(--bg-secondary);
}

.currency-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.currency-cell .flag {
    font-size: 1.5rem;
}

.currency-cell .info strong {
    display: block;
    color: var(--text-primary);
}

.currency-cell .info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rate-cell {
    font-family: var(--font-mono);
    font-weight: 600;
}

.convert-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    background: rgba(26, 86, 219, 0.1);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.convert-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================== Responsive Converter ==================== */
@media (max-width: 991px) {
    .converter-container {
        grid-template-columns: 1fr;
    }
    
    .converter-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .quick-rates-widget,
    .history-widget,
    .popular-currencies {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 767px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .converter-main {
        padding: var(--spacing-lg);
    }
    
    .converter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .converter-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .swap-currencies {
        justify-self: center;
        margin: 0;
    }
    
    .amount-input {
        font-size: 1.25rem;
        padding: var(--spacing-md);
    }
    
    .result-amount {
        font-size: 1.75rem;
    }
    
    .converter-sidebar {
        flex-direction: column;
    }
    
    .quick-rates-widget,
    .history-widget,
    .popular-currencies {
        min-width: 100%;
    }
    
    .currencies-table-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .table-search {
        width: 100%;
    }
    
    .table-search input {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 575px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .converter-tabs {
        width: 100%;
    }
    
    .converter-tab {
        flex: 1;
        text-align: center;
    }
    
    .modal-content {
        margin: var(--spacing-md);
        max-height: calc(100vh - 2rem);
    }
}
