/**
 * EP Reference Decoder - Styles
 */

/* Loading state */
.ep-reference-decoder-container {
    min-height: 200px;
}

.ep-ref-decoder-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
    gap: 16px;
}

.ep-ref-decoder-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #00A651;
    border-radius: 50%;
    animation: ep-ref-spin 0.8s linear infinite;
}

@keyframes ep-ref-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark theme loading */
[data-theme="dark"] .ep-ref-decoder-loading {
    color: #94a3b8;
}

[data-theme="dark"] .ep-ref-decoder-spinner {
    border-color: #334155;
    border-top-color: #00A651;
}

/* Responsive */
@media (max-width: 640px) {
    .ep-reference-decoder-container {
        padding: 16px !important;
    }
    
    .ep-reference-decoder-container input {
        font-size: 14px !important;
        padding: 14px 44px !important;
    }
}

/* Print styles */
@media print {
    .ep-reference-decoder-container {
        display: none;
    }
}

/* Accessibility */
.ep-reference-decoder-container button:focus-visible,
.ep-reference-decoder-container input:focus-visible {
    outline: 2px solid #00A651;
    outline-offset: 2px;
}

/* Smooth transitions */
.ep-reference-decoder-container button,
.ep-reference-decoder-container input {
    transition: all 0.15s ease;
}

.ep-reference-decoder-container button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.ep-reference-decoder-container button:active:not(:disabled) {
    transform: translateY(0);
}

/* WooCommerce integration */
.woocommerce .ep-reference-decoder-container {
    margin-bottom: 30px;
}

/* Woodmart theme compatibility */
.woodmart-theme .ep-reference-decoder-container {
    font-family: inherit;
}

/* Override Woodmart button styles */
.woodmart-theme .ep-reference-decoder-container button {
    line-height: 1.4;
    letter-spacing: 0;
}

/* Floating button (optional) */
.ep-ref-decoder-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00A651 0%, #008C44 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 166, 81, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
}

.ep-ref-decoder-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 166, 81, 0.5);
}

.ep-ref-decoder-floating-btn svg {
    width: 24px;
    height: 24px;
}

/* Modal styles */
.ep-ref-decoder-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ep-ref-decoder-modal.active {
    opacity: 1;
    visibility: visible;
}

.ep-ref-decoder-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.ep-ref-decoder-modal.active .ep-ref-decoder-modal-content {
    transform: translateY(0);
}

.ep-ref-decoder-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

/* JetBrains Mono font import */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');
