/* ========================================
   EURORON.RO - Custom Styles
   Curs Valutar BNR - Mobile First Design
   ======================================== */

/* ===== Base Styles ===== */
:root {
    --primary-color: #1cc88a;
    --primary-dark: #17a673;
    --secondary-color: #4e73df;
    --bg-light: #f8f9fc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
}

/* ===== No Sidebar - Full Width Layout ===== */
#content-wrapper {
    margin-left: 0 !important;
    width: 100%;
}

.sidebar {
    display: none !important;
}

.bg-gradient-success {
    background: linear-gradient(180deg, #1cc88a 0%, #13855c 100%);
}

/* ===== Currency Cards ===== */
.currency-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.currency-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.currency-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.currency-icon span {
    line-height: 1;
}

/* Rate value styling */
#eur-rate, #usd-rate, #gbp-rate, #chf-rate {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
}

/* Change indicators */
.rate-up {
    color: #e74a3b;
    font-weight: 600;
}

.rate-up::before {
    content: '▲ ';
}

.rate-down {
    color: #1cc88a;
    font-weight: 600;
}

.rate-down::before {
    content: '▼ ';
}

.rate-same {
    color: #858796;
    font-weight: 600;
}

.rate-same::before {
    content: '— ';
}

/* ===== Converter Section ===== */
.result-box {
    border: 2px dashed #d1d3e2;
    transition: all 0.3s ease;
}

.result-box.has-value {
    border-color: #1cc88a;
    background-color: rgba(28, 200, 138, 0.05);
}

#result {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

/* Swap button animation */
#swap-currencies {
    transition: transform 0.3s ease;
}

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

/* ===== Chart Area ===== */
.chart-area {
    position: relative;
    height: 350px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-area {
        height: 250px;
    }
}

/* ===== Table Styling ===== */
#rates-table {
    font-size: 0.95rem;
}

#rates-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

#rates-table tbody tr {
    transition: background-color 0.2s ease;
}

#rates-table tbody tr:hover {
    background-color: rgba(28, 200, 138, 0.05);
}

/* ===== Ad Placeholders ===== */
.ad-card {
    border: 2px dashed #d1d3e2;
    background-color: #fafafa;
}

.ad-placeholder {
    padding: 2rem;
    border-radius: 8px;
    background-color: #f0f0f0;
}

.ad-placeholder-large {
    padding: 3rem;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
    /* Reduce overall font sizes */
    body {
        font-size: 14px;
    }

    /* Currency cards on mobile - smaller */
    .currency-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    #eur-rate, #usd-rate, #gbp-rate, #chf-rate {
        font-size: 1.1rem;
    }

    .text-xs {
        font-size: 0.7rem !important;
    }

    /* Converter result - smaller */
    #result {
        font-size: 1.5rem;
    }

    .result-box {
        padding: 1rem !important;
    }

    #result-details {
        font-size: 0.75rem;
    }

    /* Form controls - smaller */
    .form-control {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
    }

    .form-control-lg {
        font-size: 14px !important;
        padding: 0.5rem 0.75rem !important;
    }

    select.form-control {
        font-size: 13px;
    }

    /* Labels smaller */
    label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    /* Table mobile view - compact */
    #rates-table {
        font-size: 0.75rem;
    }

    #rates-table th {
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
    }

    #rates-table td {
        padding: 0.4rem 0.25rem;
    }

    /* Card padding reduction */
    .card-body {
        padding: 0.75rem;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    .card-header h6 {
        font-size: 0.85rem;
    }

    /* Button sizing - smaller */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Page heading smaller */
    .h3, h3 {
        font-size: 1.1rem;
    }

    .h4, h4 {
        font-size: 1rem;
    }

    /* Alert smaller */
    .alert {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    /* Topbar compact */
    .topbar {
        height: auto;
        min-height: 50px;
    }

    .topbar .h4 {
        font-size: 0.9rem;
    }

    /* Container padding */
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Row margins */
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .col-xl-3, .col-md-6, .col-lg-5, .col-lg-7, .col-lg-4, .col-lg-12 {
        padding-left: 5px;
        padding-right: 5px;
    }

    /* Margin bottom smaller */
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    body {
        font-size: 13px;
    }

    #eur-rate, #usd-rate, #gbp-rate, #chf-rate {
        font-size: 1rem;
    }

    .currency-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    #result {
        font-size: 1.3rem;
    }

    .card-body {
        padding: 0.5rem;
    }

    #rates-table {
        font-size: 0.7rem;
    }
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

.currency-card {
    animation: fadeIn 0.5s ease forwards;
}

.currency-card:nth-child(1) { animation-delay: 0.1s; }
.currency-card:nth-child(2) { animation-delay: 0.2s; }
.currency-card:nth-child(3) { animation-delay: 0.3s; }
.currency-card:nth-child(4) { animation-delay: 0.4s; }

/* ===== Card Header Gradients ===== */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #858796 0%, #60616f 100%);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== Selection Color ===== */
::selection {
    background-color: rgba(28, 200, 138, 0.3);
    color: #13855c;
}

/* ===== Print Styles ===== */
@media print {
    .sidebar, .topbar, .ad-card, .scroll-to-top {
        display: none !important;
    }
    
    #content-wrapper {
        margin-left: 0 !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
