/**
 * Elementor Rates Widget Styles
 */

:root {
    --primary-color: #2563eb;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --border-color: #e5e7eb;
    --hover-bg: #f3f4f6;
}

.rates-widget {
    --primary-color: var(--primary-color, #2563eb);
    --text-color: var(--text-color, #1f2937);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.rates-widget-error {
    padding: 20px;
    text-align: center;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Slider Styles */
.rates-widget-slider {
    padding: 20px 0;
}

.rates-widget-slider .rates-swiper {
    width: 100%;
    padding: 10px 0;
}

.rates-widget-slider .swiper-slide {
    height: auto;
}

.rates-widget-slider .rate-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.rates-widget-slider .rate-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rates-widget-slider .rate-flag {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.rates-widget-slider .rate-info {
    display: flex;
    gap: 30px;
    flex: 1;
}

.rates-widget-slider .rate-section {
    flex: 1;
}

.rates-widget-slider .rate-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

.rates-widget-slider .rate-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.rates-widget-slider .rate-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.rates-widget-slider .rate-currency {
    font-size: 10px;
    color: #6b7280;
    font-weight: 400;
}

/* Table Styles */
.rates-widget-table {
    overflow-x: auto;
}

.rates-widget-table .rates-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rates-widget-table .rates-table thead {
    background: var(--primary-color);
    color: #ffffff;
}

.rates-widget-table .rates-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rates-widget-table .rates-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.rates-widget-table .rates-table tbody tr:hover {
    background: var(--hover-bg);
}

.rates-widget-table .rates-table tbody tr:last-child {
    border-bottom: none;
}

.rates-widget-table .rates-table td {
    padding: 16px;
    font-size: 16px;
}

.rates-widget-table .rate-currency-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rates-widget-table .rate-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rates-widget-table .rate-symbol {
    font-weight: 600;
    color: var(--text-color);
}

.rates-widget-table .rate-price {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.rates-widget-table .rate-currency {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

/* Cards Styles */
.rates-widget-cards {
    padding: 20px 0;
}

.rates-widget-cards .rates-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.rates-widget-cards .rate-card {
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.rates-widget-cards .rate-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.rates-widget-cards .rate-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(37, 99, 235, 0.8) 100%);
    color: #ffffff;
}

.rates-widget-cards .rate-card-header .rate-flag {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.rates-widget-cards .rate-card-header .rate-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.rates-widget-cards .rate-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rates-widget-cards .rate-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rates-widget-cards .rate-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rates-widget-cards .rate-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.rates-widget-cards .rate-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.rates-widget-cards .rate-currency {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .rates-widget-slider .rate-info {
        flex-direction: column;
        gap: 15px;
    }

    .rates-widget-slider .rate-item {
        flex-direction: column;
        text-align: center;
    }

    .rates-widget-cards .rates-cards-grid {
        grid-template-columns: 1fr;
    }

    .rates-widget-table {
        font-size: 14px;
    }

    .rates-widget-table .rates-table th,
    .rates-widget-table .rates-table td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .rates-widget-slider .rate-price {
        font-size: 20px;
    }

    .rates-widget-cards .rate-price {
        font-size: 24px;
    }

    .rates-widget-table .rates-table {
        font-size: 12px;
    }
}

