.startbutton-currency-switcher {
    position: fixed;
    top: 30%;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.startbutton-currency-switcher.hide {
    display: none;
}

/* Small Trigger Button (Always Visible) */
.currency-trigger-button {
    position: relative;
    width: auto;
    height: 48px;
    padding: 0 10px;
    background: #E34802;
    border-radius: 5%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(227, 72, 2, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.currency-trigger-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(227, 72, 2, 0.6);
}

.currency-trigger-button.active {
    transform: scale(0.95);
    background: #03071E;
}

.trigger-icon {
    color: white;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

/* Tooltip */
.trigger-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-right: 10px;
    pointer-events: none;
}

.trigger-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #333;
}

.currency-trigger-button:hover .trigger-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Main Currency Switcher Container */
.currency-switcher-container {
    position: absolute;
    top: 0;
    right: 60px; /* Position to the left of trigger button */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.currency-switcher-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.current-currency {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    min-width: 160px;
}

.current-currency:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.currency-icon {
    width: 32px;
    height: 32px;
    background: #E34802;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

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

.currency-code {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1;
}

.currency-name {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.arrow-icon {
    color: #666;
    transition: transform 0.2s ease;
}

.current-currency.active .arrow-icon {
    transform: rotate(180deg);
}

.currency-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 280px;
    max-height: 400px;
    overflow: hidden;
}

.currency-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.currency-header h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.fx-update-info {
    font-size: 11px;
    color: #666;
}

.currency-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.currency-option {
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.currency-option:hover {
    background: #f8f9fa;
}

.currency-option.active {
    background: rgba(227, 72, 2, 0.1);
}

.currency-option-content {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-option .currency-symbol {
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #333;
}

.currency-option.active .currency-symbol {
    background: #E34802;
    color: white;
}

.currency-option .currency-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.currency-option .currency-code {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1;
}

.currency-option .currency-name {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.currency-option .exchange-rate {
    font-size: 10px;
    color: #888;
    font-weight: 400;
    margin-top: 2px;
}

.check-icon {
    color: #E34802;
}

.currency-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.powered-by {
    font-size: 11px;
    color: #999;
}

.currency-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: -1;
}

.currency-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .startbutton-currency-switcher {
        top: 10px;
        right: 10px;
    }

    .currency-trigger-button {
        width: 44px;
        height: 44px;
    }

    .trigger-icon {
        font-size: 14px;
    }

    .currency-switcher-container {
        right: 56px; /* Adjust for smaller trigger button */
    }

    .current-currency {
        padding: 10px 12px;
        min-width: 140px;
    }

    .currency-options {
        min-width: 240px;
        right: -10px;
    }

    .currency-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Hide tooltip on mobile */
    .trigger-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .currency-switcher-container {
        right: 0;
        top: 56px; /* Position below trigger button on very small screens */
    }

    .currency-options {
        min-width: 220px;
        right: 0;
    }
}

/* Enhanced hover and focus states */
.currency-trigger-button:focus {
    outline: 2px solid #E34802;
    outline-offset: 2px;
}

.currency-trigger-button.hover {
    transform: scale(1.05);
}

.currency-switcher-container.scrolling {
    opacity: 0.7;
}

/* Loading states */
.currency-trigger-button.loading {
    animation: spin 1s linear infinite;
}

.current-currency.loading {
    opacity: 0.7;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth entrance animation */
.currency-switcher-container.show .current-currency {
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(20px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Accessibility improvements */
.currency-trigger-button[aria-expanded="true"] {
    background: #03071E;
}

@media (prefers-reduced-motion: reduce) {
    .currency-switcher-container,
    .currency-trigger-button,
    .currency-options,
    .trigger-tooltip {
        transition: none;
    }
    
    .currency-trigger-button.loading {
        animation: none;
    }
}

/* Hide when printing */
@media print {
    .startbutton-currency-switcher {
        display: none !important;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Currency switch success message */
.currency-switch-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive for success message */
@media (max-width: 768px) {
    .currency-switch-success {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
} 