/**
 * Public styles - TradingView-style rate board
 *
 * @package Pro_FX_Rate_Board
 */

/* Default fallback colors - will be overridden by dynamic CSS */
:root {
    --pfrb-bg-primary: #0d1117;
    --pfrb-bg-secondary: #161b22;
    --pfrb-bg-tertiary: #21262d;
    --pfrb-bg-card: #1c2128;
    --pfrb-border-color: #30363d;
    --pfrb-border-light: #21262d;
    --pfrb-text-primary: #f0f6fc;
    --pfrb-text-secondary: #8b949e;
    --pfrb-text-muted: #656d76;
    --pfrb-accent: #0969da;
    --pfrb-accent-hover: #0860ca;
    --pfrb-green: #3fb950;
    --pfrb-green-hover: #2ea043;
    --pfrb-red: #f85149;
    --pfrb-red-hover: #da3633;
    --pfrb-yellow: #d29922;
    --pfrb-blue: #58a6ff;
    --pfrb-green-bg: rgba(63, 185, 80, 0.15);
    --pfrb-red-bg: rgba(248, 81, 73, 0.15);
    --pfrb-yellow-bg: rgba(210, 153, 34, 0.15);
    --pfrb-blue-bg: rgba(88, 166, 255, 0.15);
    --pfrb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --pfrb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --pfrb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --pfrb-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --pfrb-radius-sm: 6px;
    --pfrb-radius-md: 8px;
    --pfrb-radius-lg: 12px;
    --pfrb-radius-xl: 16px;
}

/* Main Container */
.pfrb-rate-board {
    background: var(--pfrb-bg-primary);
    color: var(--pfrb-text-primary);
    padding: 32px;
    border-radius: var(--pfrb-radius-lg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    font-size: 14px;
    max-width: 100%;
    overflow: hidden;
}

/* Typography */
.pfrb-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--pfrb-text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.pfrb-section-subtitle {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 24px 0;
    color: var(--pfrb-text-secondary);
    line-height: 1.5;
}

/* Header Section */
.pfrb-rates-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pfrb-border-color);
    flex-wrap: wrap;
}

.pfrb-header-left {
    flex: 1;
    min-width: 250px;
}

.pfrb-header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pfrb-search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 200px;
}

.pfrb-search-input {
    width: 100%;
    min-width: 200px;
    max-width: 280px;
    height: 40px;
    padding: 10px 16px;
    border: 1px solid var(--pfrb-border-color);
    border-radius: var(--pfrb-radius-md);
    background: var(--pfrb-bg-secondary);
    color: var(--pfrb-text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pfrb-search-input:hover {
    border-color: var(--pfrb-text-muted);
    background: var(--pfrb-bg-tertiary);
}

.pfrb-search-input:focus {
    outline: none;
    border-color: var(--pfrb-accent);
    background: var(--pfrb-bg-tertiary);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pfrb-search-input::placeholder {
    color: var(--pfrb-text-muted);
    opacity: 0.8;
}

.pfrb-last-update {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 140px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pfrb-rates-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pfrb-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .pfrb-search-box {
        width: 100%;
    }

    .pfrb-search-input {
        max-width: 100%;
        width: 100%;
    }

    .pfrb-last-update {
        align-items: flex-start;
        width: 100%;
    }
}

.pfrb-update-label {
    font-size: 12px;
    color: var(--pfrb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.pfrb-update-time {
    font-size: 14px;
    color: var(--pfrb-text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Toggle Switch */
.pfrb-inverse-toggle {
    display: flex;
    align-items: center;
}

.pfrb-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pfrb-text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.pfrb-toggle-label:hover {
    color: var(--pfrb-text-primary);
}

.pfrb-toggle-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pfrb-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.pfrb-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pfrb-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--pfrb-bg-tertiary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
    border: 1px solid var(--pfrb-border-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pfrb-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: var(--pfrb-text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pfrb-toggle-input:checked + .pfrb-toggle-slider {
    background-color: var(--pfrb-accent);
    border-color: var(--pfrb-accent);
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.2);
}

.pfrb-toggle-input:checked + .pfrb-toggle-slider:before {
    transform: translateX(22px);
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Currency Grid */
.pfrb-currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Rate Card */
.pfrb-rate-card {
    background: var(--pfrb-bg-card);
    border: 1px solid var(--pfrb-border-color);
    border-radius: var(--pfrb-radius-lg);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--pfrb-shadow-sm);
}

.pfrb-rate-card:hover {
    border-color: var(--pfrb-accent);
    transform: translateY(-4px);
    box-shadow: var(--pfrb-shadow-xl);
}

.pfrb-rate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pfrb-accent), var(--pfrb-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pfrb-rate-card:hover::before {
    opacity: 1;
}

/* Card Header */
.pfrb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.pfrb-currency-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pfrb-currency-flags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pfrb-flag-large {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.pfrb-currency-divider {
    color: var(--pfrb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.pfrb-currency-divider svg {
    width: 16px;
    height: 16px;
}

.pfrb-currency-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--pfrb-text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.025em;
}

.pfrb-currency-info p {
    font-size: 13px;
    color: var(--pfrb-text-secondary);
    margin: 0;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.pfrb-card-status {
    display: flex;
    align-items: center;
}

.pfrb-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: var(--pfrb-radius-sm);
}

.pfrb-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pfrb-status-live {
    color: var(--pfrb-green);
    background: var(--pfrb-green-bg);
}

.pfrb-status-live .pfrb-status-dot {
    background: var(--pfrb-green);
}

.pfrb-status-delayed {
    color: var(--pfrb-yellow);
    background: var(--pfrb-yellow-bg);
}

.pfrb-status-delayed .pfrb-status-dot {
    background: var(--pfrb-yellow);
}

/* Rate Display */
.pfrb-rate-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--pfrb-bg-secondary);
    border-radius: var(--pfrb-radius-md);
    border: 1px solid var(--pfrb-border-light);
}

.pfrb-current-rate-section {
    flex: 1;
}

.pfrb-rate-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.pfrb-rate-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--pfrb-text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.pfrb-rate-currency {
    font-size: 16px;
    color: var(--pfrb-text-secondary);
    font-weight: 500;
}

.pfrb-rate-equation {
    font-size: 13px;
    color: var(--pfrb-text-secondary);
    font-variant-numeric: tabular-nums;
}

.pfrb-base-amount {
    color: var(--pfrb-text-primary);
    font-weight: 600;
}

.pfrb-equals {
    margin: 0 8px;
    color: var(--pfrb-text-muted);
}

.pfrb-quote-amount {
    color: var(--pfrb-text-primary);
    font-weight: 600;
}

/* Change Display */
.pfrb-change-display {
    text-align: right;
}

.pfrb-change-main {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.pfrb-change-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 4px;
}

.pfrb-positive .pfrb-change-icon {
    background: var(--pfrb-green-bg);
    color: var(--pfrb-green);
}

.pfrb-negative .pfrb-change-icon {
    background: var(--pfrb-red-bg);
    color: var(--pfrb-red);
}

.pfrb-neutral .pfrb-change-icon {
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-muted);
}

.pfrb-change-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.pfrb-change-percent {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

.pfrb-positive .pfrb-change-percent {
    color: var(--pfrb-green);
}

.pfrb-negative .pfrb-change-percent {
    color: var(--pfrb-red);
}

.pfrb-neutral .pfrb-change-percent {
    color: var(--pfrb-text-muted);
}

.pfrb-change-amount {
    font-size: 12px;
    color: var(--pfrb-text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Day Range */
.pfrb-day-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--pfrb-bg-secondary);
    border-radius: var(--pfrb-radius-md);
    border: 1px solid var(--pfrb-border-light);
}

.pfrb-range-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfrb-range-label {
    font-size: 11px;
    color: var(--pfrb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pfrb-range-value {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pfrb-high {
    color: var(--pfrb-green);
}

.pfrb-low {
    color: var(--pfrb-red);
}

/* Chart Container */
.pfrb-chart-container {
    margin-bottom: 20px;
}

.pfrb-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pfrb-chart-title {
    font-size: 12px;
    color: var(--pfrb-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pfrb-chart-status {
    font-size: 11px;
    color: var(--pfrb-text-muted);
    font-variant-numeric: tabular-nums;
}

.pfrb-mini-chart {
    position: relative;
    width: 100%;
    height: 80px;
    background: var(--pfrb-bg-secondary);
    border-radius: var(--pfrb-radius-md);
    border: 1px solid var(--pfrb-border-light);
    overflow: hidden;
}

.pfrb-mini-chart canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.pfrb-chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfrb-bg-secondary);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.pfrb-chart-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.pfrb-chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--pfrb-text-secondary);
    font-size: 12px;
}

.pfrb-chart-loading svg {
    animation: spin 1s linear infinite;
}

/* Action Buttons */
.pfrb-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pfrb-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--pfrb-radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.pfrb-action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pfrb-btn-primary {
    background: var(--pfrb-accent);
    color: white;
}

.pfrb-btn-primary:hover {
    background: var(--pfrb-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
}

.pfrb-btn-secondary {
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-primary);
    border: 1px solid var(--pfrb-border-color);
}

.pfrb-btn-secondary:hover {
    background: var(--pfrb-bg-secondary);
    border-color: var(--pfrb-accent);
    transform: translateY(-1px);
}

.pfrb-btn-disabled {
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.pfrb-btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Card Details */
.pfrb-card-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--pfrb-border-light);
}

.pfrb-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.pfrb-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfrb-detail-label {
    font-size: 11px;
    color: var(--pfrb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pfrb-detail-value {
    font-size: 13px;
    color: var(--pfrb-text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Table Wrapper (legacy) */
.pfrb-table-wrapper {
    margin-bottom: 32px;
}

.pfrb-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Rates Table */
.pfrb-rates-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--pfrb-bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.pfrb-rates-table thead {
    background: var(--pfrb-bg-tertiary);
}

.pfrb-rates-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--pfrb-text-secondary);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--pfrb-border-color);
}

.pfrb-rates-table td {
    padding: 16px;
    border-bottom: 1px solid var(--pfrb-border-color);
}

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

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

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

/* Instrument Cell */
.pfrb-instrument-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--pfrb-text-primary);
    margin-bottom: 4px;
}

.pfrb-instrument-pair {
    font-size: 12px;
    color: var(--pfrb-text-secondary);
}

/* Currency Cell */
.pfrb-currency-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pfrb-currency-flags {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
}

.pfrb-flag {
    font-size: 20px;
    line-height: 1;
}

.pfrb-custom-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.pfrb-currency-separator {
    color: var(--pfrb-text-muted);
    font-size: 14px;
    margin: 0 2px;
}

.pfrb-currency-info {
    display: flex;
    flex-direction: column;
}

.pfrb-currency-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--pfrb-text-primary);
}

.pfrb-currency-pair {
    font-size: 12px;
    color: var(--pfrb-text-secondary);
}

/* Rate Cell */
.pfrb-rate-value {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--pfrb-text-primary);
}

/* Change Cell */
.pfrb-change-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pfrb-change-value small {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
}

.pfrb-change-up {
    color: var(--pfrb-green);
    background: var(--pfrb-green-bg);
}

.pfrb-change-down {
    color: var(--pfrb-red);
    background: var(--pfrb-red-bg);
}

/* Updated Time */
.pfrb-updated time {
    font-size: 12px;
    color: var(--pfrb-text-secondary);
}

/* No Data */
.pfrb-no-data {
    color: var(--pfrb-text-secondary);
    font-size: 14px;
}

/* Chart Wrapper */
.pfrb-chart-wrapper {
    margin-bottom: 32px;
}

.pfrb-chart-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--pfrb-bg-secondary);
    border-radius: 6px;
}

.pfrb-chart-controls label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pfrb-text-secondary);
}

.pfrb-instrument-select {
    padding: 8px 12px;
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-primary);
    border: 1px solid var(--pfrb-border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.pfrb-instrument-select:hover,
.pfrb-instrument-select:focus {
    border-color: var(--pfrb-accent);
}

/* Chart Container */
.pfrb-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--pfrb-bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.pfrb-chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--pfrb-text-secondary);
    font-size: 14px;
}

/* Order Button */
.pfrb-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pfrb-order-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    color: white;
    text-decoration: none;
}

.pfrb-order-btn:active {
    transform: translateY(0);
}

.pfrb-order-btn.pfrb-disabled {
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.pfrb-order-btn.pfrb-disabled:hover {
    background: var(--pfrb-bg-tertiary);
    transform: none;
    box-shadow: none;
}

.pfrb-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.pfrb-btn-text {
    font-weight: 600;
}

/* Actions Cell */
.pfrb-actions-cell {
    display: flex;
    justify-content: center;
}

.pfrb-td-actions {
    padding: 12px 16px;
    text-align: center;
}

/* Footer */
.pfrb-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--pfrb-border-color);
    font-size: 12px;
    color: var(--pfrb-text-secondary);
}

.pfrb-footer p {
    margin: 0;
}

#pfrb-last-refresh-time {
    font-weight: 600;
    color: var(--pfrb-text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pfrb-rate-board {
        padding: 16px;
    }

    .pfrb-rates-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .pfrb-section-title {
        font-size: 20px;
    }

    .pfrb-section-subtitle {
        font-size: 13px;
    }

    .pfrb-header-controls {
        width: 100%;
        justify-content: space-between;
    }

    /* Hide default table, show card layout */
    .pfrb-table-wrapper {
        overflow: visible;
    }

    .pfrb-rates-table {
        border: none;
        background: none;
    }

    .pfrb-rates-table thead {
        display: none;
    }

    .pfrb-rates-table,
    .pfrb-rates-table tbody {
        display: block;
        width: 100%;
    }

    .pfrb-rates-table tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        width: 100%;
        margin-bottom: 20px;
        background: #ffffff;
        border-radius: var(--pfrb-radius-lg);
        padding: 18px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .pfrb-rates-table td {
        display: block;
        width: 100%;
    }

    /* Dark mode support */
    .pfrb-rate-board[data-theme="dark"] .pfrb-rates-table tr,
    [data-theme="dark"] .pfrb-rates-table tr {
        background: var(--pfrb-bg-card);
        border-color: var(--pfrb-border-color);
    }

    .pfrb-rate-board[data-theme="dark"] .pfrb-currency-name,
    [data-theme="dark"] .pfrb-currency-name {
        color: var(--pfrb-text-primary);
    }

    .pfrb-rate-board[data-theme="dark"] .pfrb-rate-value,
    [data-theme="dark"] .pfrb-rate-value {
        color: var(--pfrb-text-primary);
    }

    .pfrb-rate-board[data-theme="dark"] .pfrb-range-cell,
    [data-theme="dark"] .pfrb-range-cell {
        color: var(--pfrb-text-primary);
    }

    .pfrb-rate-board[data-theme="dark"] .pfrb-td-currency,
    [data-theme="dark"] .pfrb-td-currency {
        border-bottom-color: var(--pfrb-border-light);
    }

    .pfrb-rates-table tr:hover {
        border-color: var(--pfrb-accent);
        box-shadow: 0 4px 12px rgba(9, 105, 218, 0.12);
    }

    .pfrb-rates-table td {
        padding: 0;
        border: none;
    }

    .pfrb-rates-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        color: #9ca3af;
        margin-bottom: 6px;
        letter-spacing: 0.5px;
    }

    /* Currency Cell - Header full width */
    .pfrb-td-currency {
        grid-column: 1 / -1;
        padding-bottom: 14px;
        margin-bottom: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .pfrb-td-currency::before {
        display: none;
    }

    .pfrb-currency-cell {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .pfrb-currency-flags {
        font-size: 24px;
    }

    .pfrb-custom-icon {
        width: 36px;
        height: 36px;
    }

    .pfrb-currency-name {
        font-size: 16px;
        font-weight: 700;
        color: #111827;
    }

    .pfrb-currency-pair {
        font-size: 13px;
        color: #6b7280;
    }

    /* Rate - left column */
    .pfrb-td-rate {
        grid-column: 1;
    }

    .pfrb-rate-cell {
        display: flex;
        align-items: baseline;
        gap: 6px;
    }

    .pfrb-rate-value {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
    }

    .pfrb-rate-currency {
        font-size: 14px;
        color: #6b7280;
    }

    /* Change - right column */
    .pfrb-td-change {
        grid-column: 2;
    }

    .pfrb-change-cell {
        display: inline-flex;
        padding: 6px 10px;
        border-radius: var(--pfrb-radius-sm);
    }

    .pfrb-change-icon svg {
        width: 16px;
        height: 16px;
    }

    .pfrb-change-value {
        font-size: 14px;
    }

    /* High - left column */
    .pfrb-td-high {
        grid-column: 1;
    }

    /* Low - right column */
    .pfrb-td-low {
        grid-column: 2;
    }

    .pfrb-range-cell {
        font-size: 15px;
        font-weight: 600;
        color: #374151;
    }

    /* Status - full width */
    .pfrb-td-status {
        grid-column: 1 / -1;
    }

    .pfrb-status-badge {
        display: inline-flex;
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Actions - full width */
    .pfrb-td-actions {
        grid-column: 1 / -1;
    }

    .pfrb-td-actions::before {
        display: none;
    }

    .pfrb-actions-cell {
        margin-top: 0;
    }

    .pfrb-order-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        font-weight: 700;
        gap: 10px;
        justify-content: center;
        min-height: 48px;
        border-radius: var(--pfrb-radius-md);
    }

    .pfrb-btn-icon {
        width: 20px;
        height: 20px;
    }

    .pfrb-btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .pfrb-btn-text {
        display: inline-block;
        font-size: 15px;
    }

    /* Grid layouts */
    .pfrb-currency-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pfrb-rate-card {
        padding: 20px;
    }

    .pfrb-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pfrb-currency-header {
        width: 100%;
    }

    .pfrb-rate-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pfrb-change-display {
        align-self: flex-end;
        text-align: right;
    }

    .pfrb-rate-amount {
        margin-bottom: 4px;
    }

    .pfrb-day-range {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pfrb-mini-chart {
        height: 60px;
    }

    .pfrb-card-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pfrb-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .pfrb-chart-container {
        height: 300px;
    }

    .pfrb-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Small Mobile - Fine tuning */
@media (max-width: 480px) {
    .pfrb-rate-board {
        padding: 12px;
    }

    .pfrb-section-title {
        font-size: 18px;
    }

    .pfrb-section-subtitle {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .pfrb-rates-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .pfrb-rates-table tr {
        padding: 16px;
        margin-bottom: 16px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        gap: 12px;
    }

    /* Dark mode support for small mobile */
    .pfrb-rate-board[data-theme="dark"] .pfrb-rates-table tr,
    [data-theme="dark"] .pfrb-rates-table tr {
        background: var(--pfrb-bg-card);
        border-color: var(--pfrb-border-color);
    }

    /* Currency header */
    .pfrb-td-currency {
        padding-bottom: 12px;
    }

    /* Currency name slightly smaller */
    .pfrb-currency-name {
        font-size: 15px;
    }

    .pfrb-currency-pair {
        font-size: 12px;
    }

    .pfrb-currency-flags {
        font-size: 20px;
    }

    .pfrb-custom-icon {
        width: 32px;
        height: 32px;
    }

    /* Rate display */
    .pfrb-rate-value {
        font-size: 22px;
    }

    .pfrb-rate-currency {
        font-size: 15px;
    }

    /* Change indicator */
    .pfrb-change-cell {
        padding: 6px 10px;
    }

    .pfrb-change-value {
        font-size: 14px;
    }

    .pfrb-change-icon svg {
        width: 16px;
        height: 16px;
    }

    /* High/Low */
    .pfrb-range-cell {
        font-size: 15px;
    }

    /* WhatsApp button - keep it big and touch-friendly */
    .pfrb-order-btn {
        padding: 12px 18px;
        font-size: 14px;
        min-height: 44px;
    }

    .pfrb-btn-icon {
        width: 18px;
        height: 18px;
    }

    .pfrb-btn-icon svg {
        width: 18px;
        height: 18px;
    }

    .pfrb-btn-text {
        font-size: 14px;
    }

    /* Chart and other elements */
    .pfrb-rate-card {
        padding: 16px;
    }

    .pfrb-mini-chart {
        height: 50px;
    }

    .pfrb-header-controls {
        gap: 12px;
    }

    .pfrb-details-grid {
        grid-template-columns: 1fr;
    }

    .pfrb-chart-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pfrb-instrument-select {
        width: 100%;
    }

    .pfrb-chart-container {
        height: 250px;
    }
}

/* Loading Animation */
@keyframes pfrb-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pfrb-loading {
    animation: pfrb-pulse 1.5s ease-in-out infinite;
}

/* Flash Animation for Updates */
@keyframes pfrb-flash {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: var(--pfrb-accent);
        opacity: 0.1;
    }
}

.pfrb-updated-flash {
    animation: pfrb-flash 1s ease-in-out;
}

/* Hover Effects */
.pfrb-currency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pfrb-accent), var(--pfrb-green));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pfrb-currency-card:hover::before {
    opacity: 1;
}

/* Focus Styles for Accessibility */
.pfrb-action-btn:focus-visible,
.pfrb-toggle-input:focus-visible + .pfrb-toggle-slider {
    outline: 2px solid var(--pfrb-accent);
    outline-offset: 2px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

.pfrb-rate-card {
    animation: slideInUp 0.5s ease-out;
}

.pfrb-rate-card:nth-child(1) { animation-delay: 0.1s; }
.pfrb-rate-card:nth-child(2) { animation-delay: 0.2s; }
.pfrb-rate-card:nth-child(3) { animation-delay: 0.3s; }
.pfrb-rate-card:nth-child(4) { animation-delay: 0.4s; }
.pfrb-rate-card:nth-child(5) { animation-delay: 0.5s; }
.pfrb-rate-card:nth-child(6) { animation-delay: 0.6s; }

/* Accessibility */
.pfrb-rate-board:focus-visible {
    outline: 2px solid var(--pfrb-accent);
    outline-offset: 2px;
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .pfrb-currency-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 20px;
    }

    .pfrb-rate-card {
        padding: 22px;
    }

    .pfrb-rate-value {
        font-size: 26px;
    }

    .pfrb-header-controls {
        gap: 20px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .pfrb-currency-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 24px;
    }

    .pfrb-rate-card {
        padding: 28px;
    }

    .pfrb-rate-value {
        font-size: 32px;
    }

    .pfrb-mini-chart {
        height: 100px;
    }

    .pfrb-section-title {
        font-size: 28px;
    }
}

/* Ultra Wide Desktop */
@media (min-width: 1400px) {
    .pfrb-currency-grid {
        grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    }

    .pfrb-rate-board {
        padding: 40px;
    }
}

/* Historical Chart Section */
.pfrb-history-section {
    margin-top: 32px;
    padding: 24px;
    background: var(--pfrb-bg-secondary);
    border-radius: var(--pfrb-radius-lg);
    border: 1px solid var(--pfrb-border-color);
}

.pfrb-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.pfrb-history-title {
    flex: 1;
}

.pfrb-history-title .pfrb-section-title {
    margin-bottom: 0;
}

.pfrb-instrument-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pfrb-selector-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pfrb-text-secondary);
    white-space: nowrap;
}

.pfrb-instrument-select {
    min-width: 200px;
    padding: 10px 16px;
    background: var(--pfrb-bg-tertiary);
    color: var(--pfrb-text-primary);
    border: 1px solid var(--pfrb-border-color);
    border-radius: var(--pfrb-radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.pfrb-instrument-select:hover {
    border-color: var(--pfrb-accent);
    background: var(--pfrb-bg-card);
}

.pfrb-instrument-select:focus {
    border-color: var(--pfrb-accent);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.pfrb-chart-wrapper {
    position: relative;
    background: var(--pfrb-bg-tertiary);
    border-radius: var(--pfrb-radius-md);
    overflow: hidden;
    border: 1px solid var(--pfrb-border-light);
}

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

.pfrb-chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--pfrb-bg-tertiary);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.pfrb-loading-spinner svg {
    animation: spin 1s linear infinite;
    color: var(--pfrb-accent);
}

.pfrb-loading-text {
    font-size: 14px;
    color: var(--pfrb-text-secondary);
    margin: 0;
}

/* Responsive for Historical Chart */
@media (max-width: 768px) {
    .pfrb-history-section {
        padding: 20px 16px;
        margin-top: 24px;
    }

    .pfrb-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pfrb-instrument-selector {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pfrb-selector-label {
        font-size: 12px;
    }

    .pfrb-instrument-select {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
        font-size: 15px;
    }

    .pfrb-chart-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .pfrb-history-section {
        padding: 16px;
        margin-top: 20px;
    }

    .pfrb-history-title .pfrb-section-title {
        font-size: 18px;
    }

    .pfrb-chart-container {
        height: 280px;
    }

    .pfrb-instrument-select {
        font-size: 14px;
    }
}

/* ============================================
   WhatsApp Popup Styles - Theme Adaptive
   ============================================ */

.pfrb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.pfrb-popup-overlay.pfrb-popup-active {
    opacity: 1;
    visibility: visible;
}

.pfrb-popup-container {
    background: var(--pfrb-bg-primary, #ffffff);
    border-radius: var(--pfrb-radius-lg, 12px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16),
                0 12px 24px rgba(0, 0, 0, 0.12),
                0 0 0 1px var(--pfrb-border-color, #e5e7eb);
    max-width: 440px;
    width: 100%;
    transform: scale(0.95) translateY(16px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.pfrb-popup-active .pfrb-popup-container {
    transform: scale(1) translateY(0);
}

.pfrb-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--pfrb-border-color, #e5e7eb);
    background: var(--pfrb-bg-secondary, #f8f9fa);
}

.pfrb-popup-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pfrb-text-primary, #1f2937);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.pfrb-popup-close {
    background: transparent;
    border: none;
    color: var(--pfrb-text-secondary, #6b7280);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--pfrb-radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: -6px -6px -6px 0;
    flex-shrink: 0;
}

.pfrb-popup-close:hover {
    background: var(--pfrb-bg-tertiary, #e5e7eb);
    color: var(--pfrb-text-primary, #1f2937);
}

.pfrb-popup-close:active {
    transform: scale(0.95);
}

.pfrb-popup-body {
    padding: 24px;
    background: var(--pfrb-bg-primary, #ffffff);
}

.pfrb-popup-subtitle {
    margin: 0 0 18px;
    color: var(--pfrb-text-secondary, #6b7280);
    font-size: 14px;
    line-height: 1.5;
}

.pfrb-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pfrb-whatsapp-choice-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--pfrb-bg-secondary, #f8f9fa);
    border: 1.5px solid var(--pfrb-border-color, #e5e7eb);
    border-radius: var(--pfrb-radius-md, 8px);
    text-decoration: none;
    color: var(--pfrb-text-primary, #1f2937);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pfrb-whatsapp-choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
                                rgba(37, 211, 102, 0.08) 0%,
                                rgba(37, 211, 102, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pfrb-whatsapp-choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1),
                0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: #25d366;
}

.pfrb-whatsapp-choice-btn:hover::before {
    opacity: 1;
}

.pfrb-whatsapp-choice-btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.pfrb-choice-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 211, 102, 0.12);
    border-radius: var(--pfrb-radius-md, 8px);
    color: #25d366;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.pfrb-whatsapp-choice-btn:hover .pfrb-choice-icon {
    transform: scale(1.05);
    background: rgba(37, 211, 102, 0.18);
}

.pfrb-admin-btn .pfrb-choice-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.pfrb-admin-btn:hover .pfrb-choice-icon {
    background: rgba(59, 130, 246, 0.18);
}

.pfrb-admin-btn::before {
    background: linear-gradient(135deg,
                                rgba(59, 130, 246, 0.08) 0%,
                                rgba(59, 130, 246, 0.03) 100%);
}

.pfrb-admin-btn:hover {
    border-color: #3b82f6;
}

.pfrb-cs-btn .pfrb-choice-icon {
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
}

.pfrb-cs-btn:hover .pfrb-choice-icon {
    background: rgba(37, 211, 102, 0.18);
}

.pfrb-choice-content {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.pfrb-choice-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px;
    color: var(--pfrb-text-primary, #1f2937);
    line-height: 1.4;
}

.pfrb-choice-desc {
    font-size: 13px;
    margin: 0;
    color: var(--pfrb-text-secondary, #6b7280);
    line-height: 1.4;
}

.pfrb-choice-arrow {
    flex-shrink: 0;
    color: var(--pfrb-text-muted, #9ca3af);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.pfrb-whatsapp-choice-btn:hover .pfrb-choice-arrow {
    transform: translateX(3px);
    color: var(--pfrb-text-secondary, #6b7280);
}

/* Print Styles */
@media print {
    .pfrb-rate-board {
        background: white;
        color: black;
    }

    .pfrb-cards-wrapper {
        display: none;
    }

    .pfrb-chart-wrapper {
        display: none;
    }

    .pfrb-footer {
        display: none;
    }

    .pfrb-popup-overlay {
        display: none !important;
    }
}

/* Mobile Responsive for Popup */
@media (max-width: 768px) {
    .pfrb-popup-overlay {
        padding: 16px;
    }

    .pfrb-popup-container {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .pfrb-popup-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .pfrb-popup-container {
        border-radius: var(--pfrb-radius-lg, 12px) var(--pfrb-radius-lg, 12px) 0 0;
        margin-bottom: 0;
    }

    .pfrb-popup-header {
        padding: 18px 20px;
    }

    .pfrb-popup-title {
        font-size: 17px;
    }

    .pfrb-popup-body {
        padding: 20px;
    }

    .pfrb-popup-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .pfrb-whatsapp-choice-btn {
        padding: 14px 16px;
        gap: 12px;
    }

    .pfrb-choice-icon {
        width: 44px;
        height: 44px;
    }

    .pfrb-choice-icon svg {
        width: 22px;
        height: 22px;
    }

    .pfrb-choice-title {
        font-size: 15px;
    }

    .pfrb-choice-desc {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pfrb-popup-overlay {
        padding: 0;
    }

    .pfrb-popup-container {
        border-radius: var(--pfrb-radius-md, 8px) var(--pfrb-radius-md, 8px) 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pfrb-popup-header {
        padding: 16px 18px;
    }

    .pfrb-popup-title {
        font-size: 16px;
    }

    .pfrb-popup-body {
        padding: 18px;
    }

    .pfrb-popup-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .pfrb-whatsapp-choice-btn {
        padding: 13px 15px;
        gap: 11px;
    }

    .pfrb-choice-icon {
        width: 42px;
        height: 42px;
    }

    .pfrb-choice-icon svg {
        width: 21px;
        height: 21px;
    }

    .pfrb-choice-title {
        font-size: 14px;
    }

    .pfrb-choice-desc {
        font-size: 12px;
    }

    .pfrb-choice-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .pfrb-popup-header {
        padding: 14px 16px;
    }

    .pfrb-popup-body {
        padding: 16px;
    }

    .pfrb-popup-buttons {
        gap: 8px;
    }

    .pfrb-whatsapp-choice-btn {
        padding: 12px 14px;
        gap: 10px;
    }

    .pfrb-choice-icon {
        width: 40px;
        height: 40px;
    }

    .pfrb-choice-icon svg {
        width: 20px;
        height: 20px;
    }

    .pfrb-choice-title {
        font-size: 14px;
    }

    .pfrb-choice-desc {
        font-size: 11px;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .pfrb-popup-overlay {
        align-items: center;
        padding: 20px;
    }

    .pfrb-popup-container {
        border-radius: var(--pfrb-radius-lg, 12px);
        max-height: 90vh;
        overflow-y: auto;
    }

    .pfrb-popup-header,
    .pfrb-popup-body {
        padding: 16px 20px;
    }

    .pfrb-whatsapp-choice-btn {
        padding: 12px 16px;
    }

    .pfrb-choice-icon {
        width: 40px;
        height: 40px;
    }
}
