/* Calculator Page - Simple Design matching category-detail & all-assets */

/* Import CSS variables */
@import url("../variables.a45104a2cb93.css");

/* ========================================= */
/* Category Header (Simple like other pages) */
/* ========================================= */

.category-header {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 183, 0, 0.1);
    margin-bottom: 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF4E6 100%);
    border-radius: 16px;
    color: #FFB700;
    border: 2px solid rgba(255, 183, 0, 0.15);
    font-size: 1.75rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.category-subtitle {
    color: #718096;
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================= */
/* Calculator Tabs - Enhanced                */
/* ========================================= */

.calculator-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 0;
    position: relative;
}

.calculator-tab {
    padding: 0.875rem 1.75rem;
    border: none;
    background: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: #718096;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
}

.calculator-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFB700 0%, #FF9500 100%);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.calculator-tab:hover {
    color: #FFB700;
    background: rgba(255, 183, 0, 0.08);
}

.calculator-tab.active {
    color: #2d3748;
    font-weight: 700;
    background: rgba(255, 183, 0, 0.05);
}

.calculator-tab.active::before {
    width: 100%;
}

.calculator-tab i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.calculator-tab:hover i {
    transform: scale(1.2);
}

/* Tab content animations */
.calculator-content {
    animation: fadeIn 0.4s ease-in-out;
}

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

/* ========================================= */
/* Calculator Card                           */
/* ========================================= */

.calculator-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 183, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calculator-card h4,
.calculator-card h5 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Section headers with icons */
.calculator-card .d-flex.align-items-center i {
    color: #FFB700;
    font-size: 1.25rem;
}

.calculator-card .d-flex.align-items-center h4,
.calculator-card .d-flex.align-items-center h5 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0;
}

/* Refresh buttons */
.calculator-card .btn-sm {
    background: rgba(255, 183, 0, 0.1);
    color: #FFB700;
    border: 1px solid rgba(255, 183, 0, 0.3);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.calculator-card .btn-sm:hover:not(.loading):not(.success) {
    background: rgba(255, 183, 0, 0.2);
    border-color: #FFB700;
    transform: translateY(-1px);
}

/* Loading state */
.calculator-card .btn-sm.loading {
    background: rgba(255, 183, 0, 0.15);
    border-color: #FFB700;
    pointer-events: none;
}

.calculator-card .btn-sm.loading i.fa-sync-alt {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success state */
.calculator-card .btn-sm.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22C55E;
    color: #22C55E;
}

.calculator-card .btn-sm.success i {
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Info box (warning/notice) */
.info-box {
    background: rgba(255, 183, 0, 0.05);
    border-left: 3px solid #FFB700;
    padding: 1rem;
    border-radius: 8px;
}

.info-box i {
    color: #FFB700;
}

.info-box strong {
    color: #2d3748;
}

/* ========================================= */
/* Form Elements                             */
/* ========================================= */

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-select,
.form-control {
    border-color: rgba(255, 183, 0, 0.2);
    transition: all 0.3s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #FFB700;
    box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.1);
}

/* Enhanced Input Groups */
.input-group {
    box-shadow: 0 2px 4px rgba(255, 183, 0, 0.05);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.15);
}

.input-group-text {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.08) 0%, rgba(255, 183, 0, 0.05) 100%);
    border: 1px solid rgba(255, 183, 0, 0.3);
    color: #FFB700;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group:focus-within .input-group-text {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.15) 0%, rgba(255, 183, 0, 0.1) 100%);
    border-color: #FFB700;
    color: #FF9500;
}

/* Larger input group for prominent inputs */
.input-group-lg .input-group-text {
    font-size: 1.35rem;
    padding: 1rem 1.25rem;
    font-weight: 800;
    min-width: 60px;
}

/* ========================================= */
/* Exchange Icon                             */
/* ========================================= */

.exchange-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.exchange-icon {
    font-size: 2rem;
    color: #FFB700;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 1rem;
    border-radius: 50%;
    background: rgba(255, 183, 0, 0.05);
}

.exchange-icon:hover {
    transform: rotate(180deg);
    background: rgba(255, 183, 0, 0.1);
}

/* ========================================= */
/* Result Display - Enhanced                 */
/* ========================================= */

.result-display {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 183, 0, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
}

.result-display:hover {
    box-shadow: 0 8px 24px rgba(255, 183, 0, 0.15);
    transform: translateY(-2px);
}

/* Animated background */
.result-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 183, 0, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.result-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 2rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #FFB700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(255, 183, 0, 0.2);
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.result-value.changed {
    animation: valueChange 0.5s ease;
}

@keyframes valueChange {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); color: #FF9500; }
}

.result-currency {
    font-size: 1.4rem;
    color: #718096;
    font-weight: 600;
}

/* Copy button */
.copy-result-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 183, 0, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    color: #FFB700;
    font-size: 0.875rem;
}

.copy-result-btn:hover {
    background: white;
    border-color: #FFB700;
    transform: scale(1.1);
}

.copy-result-btn.copied {
    background: #22C55E;
    color: white;
    border-color: #22C55E;
}

.loading-spinner {
    display: none;
}

.loading-spinner.active {
    display: flex;
}

/* Auto-calculate indicator */
.calculating-indicator {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 8px;
    height: 8px;
    background: #FFB700;
    border-radius: 50%;
    opacity: 0;
    animation: pulse-indicator 1s ease-in-out infinite;
    z-index: 3;
}

.calculating-indicator.active {
    opacity: 1;
}

@keyframes pulse-indicator {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* ========================================= */
/* Quick Amount Chips - Modern Design        */
/* ========================================= */

.quick-amounts {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.quick-amount-btn,
.quick-gold-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.08) 0%, rgba(255, 183, 0, 0.12) 100%);
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(255, 183, 0, 0.1);
}

/* Ripple effect */
.quick-amount-btn::before,
.quick-gold-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 183, 0, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quick-amount-btn:active::before,
.quick-gold-btn:active::before {
    width: 300px;
    height: 300px;
}

.quick-amount-btn:hover,
.quick-gold-btn:hover {
    border-color: rgba(255, 183, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.15) 0%, rgba(255, 183, 0, 0.2) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.25);
    color: #FFB700;
}

.quick-amount-btn.active,
.quick-gold-btn.active {
    background: linear-gradient(135deg, #FFB700 0%, #FF9500 100%);
    color: white;
    border-color: #FFB700;
    box-shadow: 0 4px 16px rgba(255, 183, 0, 0.4);
    transform: scale(1.05);
}

/* ========================================= */
/* Rate Info                                 */
/* ========================================= */

.rate-info {
    background: #f8f9fa;
    border-left: 3px solid #FFB700;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
}

.rate-info strong {
    color: #2d3748;
    font-size: 0.95rem;
}

.rate-info small {
    color: #718096;
    font-size: 0.875rem;
}

/* ========================================= */
/* Price Info Box                            */
/* ========================================= */

.price-info-box {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    border: 1px solid rgba(255, 183, 0, 0.15);
    border-radius: 12px;
    padding: 1rem;
}

.price-info-box small {
    display: block;
    color: #718096;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.price-info-box .fw-bold {
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

/* ========================================= */
/* Gold Prices Table - Modern Design         */
/* ========================================= */

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table thead th {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    border-bottom: 2px solid rgba(255, 183, 0, 0.2);
    color: #2d3748;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(255, 183, 0, 0.02);
}

.table tbody tr:hover {
    background-color: rgba(255, 183, 0, 0.08);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.15);
}

.table tbody td {
    vertical-align: middle;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
    color: #2d3748;
}

.table tbody td:first-child {
    font-weight: 600;
}

/* Ensure text-end alignment works */
.table th.text-end,
.table td.text-end {
    text-align: right !important;
}

.table thead th:first-child,
.table tbody td:first-child {
    text-align: left !important;
}

/* Price change indicators */
.table .text-success,
.table .text-danger {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.table .text-success {
    background: rgba(34, 197, 94, 0.1);
}

.table .text-danger {
    background: rgba(239, 68, 68, 0.1);
}

/* ========================================= */
/* Investment Results                        */
/* ========================================= */

.investment-results .text-muted {
    font-size: 0.875rem;
    font-weight: 500;
    color: #718096;
    margin-bottom: 0.5rem;
    display: block;
}

.investment-results h3,
.investment-results h4 {
    margin-top: 0;
}

/* ========================================= */
/* Calculation History - Modern Cards        */
/* ========================================= */

.history-item {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 183, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #FFB700 0%, #FF9500 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 183, 0, 0.03);
    border-color: rgba(255, 183, 0, 0.3);
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.15);
    transform: translateX(4px);
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-item i {
    color: #FFB700;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 183, 0, 0.1);
    border-radius: 8px;
}

.history-item small {
    color: #718096;
    font-size: 0.75rem;
    font-weight: 500;
}

.history-item > div {
    display: flex;
    align-items: center;
}

.history-item span {
    color: #2d3748;
    font-weight: 500;
}

/* Empty state */
.history-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #718096;
}

.history-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ========================================= */
/* Responsive Design                         */
/* ========================================= */

@media (max-width: 768px) {
    .category-header {
        padding: 1rem;
    }

    .category-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .calculator-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }

    .calculator-tab {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .calculator-tab span {
        display: none;
    }

    .calculator-card {
        padding: 1rem;
    }

    .result-value {
        font-size: 1.75rem;
        word-break: break-word;
    }

    .result-currency {
        font-size: 1.1rem;
    }

    .result-content {
        padding: 0 1rem;
    }

    .exchange-icon {
        font-size: 1.5rem;
        padding: 0.75rem;
    }

    .quick-amounts {
        gap: 0.375rem;
    }

    .quick-amount-btn,
    .quick-gold-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .result-display {
        min-height: 100px;
        padding: 1rem;
    }

    .calculator-tab i {
        margin-right: 0;
    }
}
