/* 
 * Gold Rates & Currency Converter - Main Stylesheet
 * This file contains common styles used across both light and dark themes
 */

/* Typography */
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 48px;
    line-height: 48px;
}

h2 {
    font-size: 36px;
    line-height: 42px;
}

h3 {
    font-size: 28px;
    line-height: 34px;
}

.heading-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f2d05c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Gold accent color for both themes */
.gold-text {
    color: #d4af37;
}

.silver-text {
    color: #c0c0c0;
}

.platinum-text {
    color: #e5e4e2;
}

/* Metal Cards Styling */
.metal-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background-color: #ffffff;
}

.metal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.metal-icon-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.metal-icon-img {
    width: 24px;
    height: 24px;
}

.metal-price {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    margin: 15px 0 5px 0;
}

/* Live Indicator */
.live-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #28a745;
    position: relative;
}

.live-dot:before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background-color: rgba(40, 167, 69, 0.3);
    animation: pulse 1.5s infinite;
}

.live-dot.pulse-strong:before {
    animation: pulse-strong 1s ease-out;
    background-color: rgba(40, 167, 69, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes pulse-strong {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Metal icon backgrounds */
.metal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
}

.gold-bg {
    background-color: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}

.silver-bg {
    background-color: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
}

.platinum-bg {
    background-color: rgba(229, 228, 226, 0.2);
    color: #e5e4e2;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: #28a745;
    box-shadow: 0 0 5px #28a745;
}

.status-indicator.offline {
    background-color: #dc3545;
    box-shadow: 0 0 5px #dc3545;
}

/* Background colors */
.bg-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f2d05c 100%);
}

/* Price change indicators */
.price-up {
    color: #28a745;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.price-down {
    color: #dc3545;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.price-change i {
    margin-right: 5px;
}

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, #f1b933 0%, #f8d87c 100%);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e5a926 0%, #f1d16e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
}

.btn-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e6e6e6 100%);
    border: none;
    color: #212529;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-silver:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Card styling */
.card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Table styling */
.table-rates {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.table-rates th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table-rates td, .table-rates th {
    padding: 1rem;
    vertical-align: middle;
}

/* Flag icons in tables */
.flag-icon {
    width: 24px;
    height: 16px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Currency converter */
.converter-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    background-color: white;
    padding: 0;
}

/* Country select styling */
.country-select {
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding-left: 40px;
    height: 50px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.country-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* Currency select styling */
.currency-select {
    display: flex;
    align-items: center;
}

.currency-select img {
    margin-right: 8px;
}

/* Hero section */
.hero-section {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 3rem;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-weight: 700;
    font-size: 48px;
    line-height: 48px;
    background: linear-gradient(135deg, #d4af37 0%, #f2d05c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    opacity: 0.7;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h5 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #d4af37;
    color: #212529;
    transform: translateY(-3px);
}

/* Market Status Bar */
.market-status-bar {
    background: linear-gradient(90deg, #e6b325 0%, #f7c12d 100%);
    border-radius: 10px;
    padding: 15px 20px;
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.market-status-bar h5 {
    font-weight: 700;
    margin-bottom: 0;
    display: inline-block;
}

.market-status-bar .status-text {
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.market-status-bar i {
    margin-right: 10px;
    font-size: 18px;
}

/* Country Selector */
.country-selector-container {
    max-width: 300px;
    margin: 0 auto;
    position: relative;
}

#country-selector {
    height: 50px;
    padding: 0.5rem 1rem;
    padding-left: 40px;
    border-radius: 25px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#country-selector:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* Country flag in selector */
.country-flag-selector {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: auto;
    border-radius: 2px;
    z-index: 2;
}

/* Custom select styling for country dropdown */
.country-select-dropdown {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    background-color: #fff;
    z-index: 1000;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option img {
    width: 20px;
    height: 14px;
    margin-right: 10px;
    border-radius: 2px;
}

.country-option-text {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Weight unit selector styling */
.weight-unit-selector {
    margin-bottom: 10px;
}

.weight-unit-selector .form-select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    font-size: 14px;
    padding: 6px 10px;
    transition: all 0.3s ease;
}

.weight-unit-selector .form-select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.gold-price-unit {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 400;
}

.country-flag {
    width: 20px;
    height: 14px;
    margin-right: 5px;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.currency-label {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

/* Currency Converter Styling - Exact Match */
.converter-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    background-color: white;
    padding: 0;
}

/* Currency select with flags */
.form-select-lg {
    height: 54px;
    padding: 0 15px;
    font-weight: 500;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* From/To/Amount labels */
.form-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Swap button styling */
#swap-currencies {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e9ecef;
    background-color: white;
    color: #6c757d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

#swap-currencies:hover {
    background-color: #f8f9fa;
    transform: rotate(180deg);
}

/* Convert button styling */
.btn-gold {
    background: #f2b90f;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 15px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-gold:hover {
    background: #e5ae0a;
    box-shadow: 0 4px 12px rgba(242, 185, 15, 0.3);
}

/* Result container styling */
#conversion-result {
    background-color: #fff9e6;
    border-radius: 12px;
    padding: 25px 15px;
    margin-top: 30px;
    border: 1px solid #ffeeba;
}

.result-container {
    text-align: center;
}

.result-container p:first-child {
    font-size: 16px;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 5px;
}

.result-container h2 {
    font-size: 38px;
    color: #212529;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-container p.text-muted {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
}

/* Section heading */
.heading-gold {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Section subtitle */
.text-muted {
    font-size: 16px;
    color: #6c757d;
}

/* Calculator heading */
h4.text-center {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 25px;
}

/* Form row spacing */
.row.g-3 {
    margin-bottom: 0;
}

/* Currency flags in select */
.select-with-flags {
    display: flex;
    align-items: center;
}

.currency-flag {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
    object-fit: cover;
}

/* Custom select styling for currency codes */
.form-select-lg option {
    font-size: 14px;
    padding: 8px;
}

/* Amount input styling */
input.form-control-lg {
    height: 54px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0 15px;
}

/* Layout adjustments */
.col-md-3, .col-md-1, .col-md-2 {
    padding: 0 10px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    h1 {
        font-size: 40px;
        line-height: 42px;
    }
    
    h2 {
        font-size: 32px;
        line-height: 38px;
    }
    
    .hero-content h1 {
        font-size: 40px;
        line-height: 42px;
    }
    
    .metal-price {
        font-size: 22px;
        line-height: 30px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-image {
        opacity: 0.3;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 36px;
        line-height: 40px;
    }
    
    h2 {
        font-size: 28px;
        line-height: 34px;
    }
    
    .hero-content h1 {
        font-size: 36px;
        line-height: 40px;
    }
    
    .market-status-bar {
        padding: 12px 15px;
    }
    
    .metal-price {
        font-size: 20px;
        line-height: 28px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    h1 {
        font-size: 32px;
        line-height: 36px;
    }
    
    h2 {
        font-size: 24px;
        line-height: 30px;
    }
    
    .hero-content h1 {
        font-size: 32px;
        line-height: 36px;
    }
    
    .table-rates {
        font-size: 0.85rem;
    }
    
    .market-status-bar {
        padding: 10px;
    }
    
    .market-status-bar h5 {
        font-size: 18px;
    }
    
    .market-status-bar .status-text {
        font-size: 14px;
    }
    
    .metal-price {
        font-size: 18px;
        line-height: 26px;
    }
    
    .metal-card .card-body {
        padding: 15px;
    }
    
    .price-change {
        font-size: 14px;
    }
    
    /* Improve header controls layout on mobile */
    .header-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-top: 0;
        gap: 10px;
    }
    
    /* Remove right margin from language switcher on mobile */
    .lang-switcher {
        margin-right: 0;
    }
    
    /* Remove right margin from theme toggle on mobile */
    .theme-toggle {
        margin-right: 0;
    }
    
    /* Make language button more compact but still touch-friendly */
    .lang-btn {
        min-width: 45px;
        padding: 6px 8px;
        height: 38px;
    }
    
    /* Improve theme toggle button on mobile */
    .theme-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .theme-btn i {
        font-size: 16px;
    }
    
    /* Hide language text on very small screens */
    @media (max-width: 360px) {
        .lang-btn span {
            display: none;
        }
        
        .lang-btn img {
            margin-right: 0;
        }
        
        .lang-btn {
            min-width: 38px;
            justify-content: center;
        }
    }
    
    /* Ensure the language dropdown appears in the right position */
    .lang-dropdown {
        right: 0;
        left: auto;
        min-width: 140px;
    }
    
    /* Improve touch targets for language options */
    .lang-option {
        padding: 12px 15px;
        min-height: 44px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .metal-price {
        font-size: 16px;
        line-height: 24px;
    }
    
    .price-change {
        font-size: 12px;
    }
    
    .metal-icon-container {
        width: 32px;
        height: 32px;
    }
    
    .metal-icon-img {
        width: 18px;
        height: 18px;
    }
}

/* Fix for flag display in select options */
select option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}

.select-with-flags {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
}

/* Custom select styling */
.form-select-lg {
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2rem;
}

/* Currency code display */
.currency-code {
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-left: 5px;
}

/* Custom select with flag and code */
.select-with-flags {
    position: relative;
    padding-left: 35px !important;
}

.select-with-flags::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 14px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

#from-currency.select-with-flags[value="USD"]::before,
#to-currency.select-with-flags[value="USD"]::before {
    background-image: url('../images/flags/us.png');
}

#from-currency.select-with-flags[value="PKR"]::before,
#to-currency.select-with-flags[value="PKR"]::before {
    background-image: url('../images/flags/pk.png');
}

/* Add other currency flags as needed */

/* Currency converter form */
#currency-converter-form .row {
    align-items: flex-end;
}

/* Form elements styling */
.form-control-lg, .form-select-lg {
    height: 48px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0 15px;
    background-color: white;
}

/* Swap button styling */
#swap-currencies {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e9ecef;
    background-color: white;
    color: #6c757d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Convert button styling */
.btn-gold {
    background: #f2b90f;
    border: none;
    color: #fff;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    height: 48px;
}

/* Input group positioning for flags */
.input-group {
    position: relative;
}

/* Currency flag styling */
.currency-flag-img {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 14px;
    border-radius: 2px;
    z-index: 5;
}

/* Adjust padding for select with flags */
.form-select-lg {
    padding-left: 45px !important;
}

/* Price Trends Section Styling */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.current-price {
    font-size: 20px;
    color: #212529;
}

.price-info .price-down {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
}

.price-info .price-up {
    color: #198754;
    font-size: 14px;
    font-weight: 500;
}

/* Global Precious Metals Rates Table */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

#global-rates-table {
    margin-bottom: 0;
}

#global-rates-table thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
}

#global-rates-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

#global-rates-table .flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.small.price-up {
    color: #198754;
    font-weight: 500;
}

.small.price-down {
    color: #dc3545;
    font-weight: 500;
}

/* Search input styling */
.search-container .input-group {
    max-width: 240px;
}

.search-container .form-control {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    height: 38px;
}

.search-container .input-group-text {
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
}

/* Historical Price Trends */
.btn-group .btn {
    border-radius: 6px;
    font-size: 14px;
    padding: 6px 12px;
}

.btn-warning {
    background-color: #f2b90f;
    border-color: #f2b90f;
    color: #fff;
}

.btn-warning:hover, .btn-warning:active, .btn-warning:focus {
    background-color: #e5ae0a !important;
    border-color: #e5ae0a !important;
    color: #fff !important;
}

.nav-tabs {
    border-bottom: 1px solid #e9ecef;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 15px;
}

.nav-tabs .nav-link.active {
    color: #f2b90f;
    border: none;
    border-bottom: 2px solid #f2b90f;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #f2b90f;
}

/* Country code styling */
.country-code {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-transform: uppercase;
    border: 1px solid #e9ecef;
}

/* Global rates table styling */
#global-rates-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

#global-rates-table thead th {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

#global-rates-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
}

#global-rates-table tbody tr:hover {
    background-color: #f8f9fa;
}

#global-rates-table td {
    padding: 16px;
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid #f1f1f1;
}

/* Country name styling */
#global-rates-table td span {
    font-size: 14px;
    font-weight: 400;
    color: #212529;
}

/* Currency code styling */
#global-rates-table td:nth-child(2) {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

/* Price styling */
#global-rates-table td div:first-child {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

/* Unit styling */
#global-rates-table td div.small.text-muted {
    font-size: 12px;
    color: #6c757d !important;
    margin: 2px 0;
}

/* Price change indicators */
.small.price-up, 
.small.price-down {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.small.price-up {
    color: #28a745;
}

.small.price-down {
    color: #dc3545;
}

.small.price-up i, 
.small.price-down i {
    font-size: 10px;
    margin-right: 4px;
}

/* N/A styling */
#global-rates-table td .text-muted {
    font-size: 14px;
    color: #adb5bd !important;
}

/* Global rates section styling */
.card-body h5.fw-bold {
    font-size: 16px;
    font-weight: 600 !important;
    color: #212529;
    margin-bottom: 0;
}

/* Historical Price Trends Section */
.heading-gold {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    text-align: center;
}

.text-muted {
    font-size: 16px;
    color: #6c757d;
    text-align: center;
}

/* Price Movement Analysis */
.card-body h5.fw-bold {
    font-size: 16px;
    font-weight: 600 !important;
    color: #212529;
    margin-bottom: 0;
}

/* Time period buttons */
.btn-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-group .btn {
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: none;
    background-color: #fff;
    color: #495057;
    transition: all 0.2s ease;
}

.btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.btn-group .btn.active {
    background-color: #f2b90f;
    color: #fff;
    font-weight: 500;
    box-shadow: none;
}

.btn-group .btn:not(.active) {
    background-color: #fff;
    color: #495057;
}

.btn-group .btn:not(.active):hover {
    background-color: #f8f9fa;
}

/* Tab navigation */
.nav-tabs-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.nav-tabs {
    border: none;
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.nav-tabs .nav-item {
    flex: 1;
    text-align: center;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    background-color: transparent;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
    color: #212529;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Price Movement Analysis heading */
.price-movement-heading {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
}

/* Highlight effect for price updates */
.highlight-update {
    animation: highlight-pulse 1s ease-out;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    50% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
}

/* Price updated animation */
.price-updated {
    animation: price-flash 1s ease-out;
}

@keyframes price-flash {
    0% {
        color: inherit;
    }
    30% {
        color: #d4af37;
    }
    100% {
        color: inherit;
    }
}

/* Custom Weight Selector Styling */
.custom-weight-container {
    transition: all 0.3s ease;
}

.weight-toggle-container {
    display: flex;
    justify-content: center;
}

.weight-toggle {
    width: 100%;
    max-width: 200px;
}

.weight-toggle .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-color: #ced4da;
}

.weight-toggle .btn-check:checked + .btn-outline-secondary {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.custom-weight-input-container {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.custom-weight-input-container.active {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.5rem;
}

.custom-weight-input {
    text-align: center;
    font-weight: 500;
}

.custom-weight-unit {
    flex: 0 0 auto;
    min-width: 80px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.custom-weight-unit:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
}

/* Dark mode styles for custom weight unit selector */
[data-bs-theme="dark"] .custom-weight-unit {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #495057;
}

.input-group-text {
    background-color: #f8f9fa;
    font-size: 0.8rem;
}

/* Custom weight slider */
.weight-slider-container {
    padding: 0 5px;
}

.weight-slider-container small {
    color: #6c757d;
    font-size: 0.7rem;
}

.form-range {
    height: 1.5rem;
}

.form-range::-webkit-slider-thumb {
    background: #d4af37;
}

.form-range::-moz-range-thumb {
    background: #d4af37;
}

.form-range::-ms-thumb {
    background: #d4af37;
}

.form-range::-webkit-slider-runnable-track {
    height: 0.25rem;
}

.form-range::-moz-range-track {
    height: 0.25rem;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* Dark mode styles for custom weight inputs */
[data-bs-theme="dark"] .input-group-text {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #495057;
}

[data-bs-theme="dark"] .custom-weight-input {
    background-color: #212529;
    color: #f8f9fa;
    border-color: #495057;
}

[data-bs-theme="dark"] .weight-toggle .btn-outline-secondary {
    color: #f8f9fa;
    border-color: #495057;
}

[data-bs-theme="dark"] .weight-toggle .btn-check:checked + .btn-outline-secondary {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #212529;
}

[data-bs-theme="dark"] .weight-slider-container small {
    color: #adb5bd;
}

/* Weight unit selector */
.weight-unit-selector {
    margin-bottom: 0.5rem;
}

/* Metal country flag styles */
.metal-country-flag {
    display: block;
    margin-top: 5px;
    height: 16px !important;
    width: auto !important;
    border-radius: 2px;
}

/* Country selector flag */
.country-flag-selector {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: auto;
    border-radius: 2px;
    z-index: 2;
}

/* Language Switcher Styles */
.lang-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.lang-btn {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.lang-btn:hover, .lang-btn:focus {
    background-color: rgba(241, 185, 51, 0.1);
    outline: none;
}

.lang-btn img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    margin-top: 5px;
    display: none;
    overflow: hidden;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover, .lang-option:focus {
    background-color: rgba(241, 185, 51, 0.1);
    color: #f1b933;
    text-decoration: none;
}

.lang-option img {
    width: 16px;
    height: 16px;
    margin-right: 10px;
}

/* Dark theme adjustments */
.dark-theme .lang-dropdown {
    background-color: #2a2a2a;
    border-color: #444;
}

.dark-theme .lang-option {
    color: #ddd;
    border-bottom-color: rgba(255,255,255,0.05);
}

.dark-theme .lang-option:hover, 
.dark-theme .lang-option:focus {
    background-color: rgba(241, 185, 51, 0.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
} 