/* ==========================================
   Thermas Light - Minimalist Consent Banner
   ========================================== */

/* Cookie Banner - Minimalist */
.thermas-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10010;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    animation: thermas-slide-up 0.3s ease-out;
}

@keyframes thermas-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.thermas-cookie-banner.thermas-cookie-hiding {
    animation: thermas-slide-down 0.25s ease-in forwards;
}

@keyframes thermas-slide-down {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.thermas-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.thermas-cookie-text {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
    flex: 1;
    min-width: 200px;
}

.thermas-cookie-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Minimalist Buttons */
.thermas-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.thermas-btn-primary {
    background: #003e6f;
    color: #ffffff;
}

.thermas-btn-primary:hover {
    background: #005596;
}

.thermas-btn-ghost {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.thermas-btn-ghost:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Responsive */
@media (max-width: 640px) {
    .thermas-cookie-banner {
        padding: 1rem;
    }

    .thermas-cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .thermas-cookie-text {
        text-align: center;
        font-size: 0.85rem;
    }

    .thermas-cookie-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .thermas-btn {
        flex: 1;
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Focus styles */
.thermas-btn:focus-visible {
    outline: 2px solid #003e6f;
    outline-offset: 2px;
}

/* ==========================================
   Consent Modal Styles
   ========================================== */

.thermas-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.thermas-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.thermas-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: thermas-modal-in 0.25s ease-out;
}

@keyframes thermas-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.thermas-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.thermas-modal-header h2 {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.thermas-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thermas-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.thermas-modal-body {
    padding: 1.5rem;
}

.thermas-modal-intro {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.thermas-consent-category {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.thermas-consent-category:last-child {
    margin-bottom: 0;
}

.thermas-consent-category input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #003e6f;
    cursor: pointer;
}

.thermas-consent-category-label {
    flex: 1;
}

.thermas-consent-category-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thermas-consent-category-title .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: #e5e7eb;
    color: #6b7280;
}

.thermas-consent-category-title .badge.required {
    background: #dcfce7;
    color: #166534;
}

.thermas-consent-category-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
}

.thermas-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.thermas-modal-links {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.75rem 1.5rem 0;
    text-align: center;
}

.thermas-modal-links a {
    color: #003e6f;
    text-decoration: none;
}

.thermas-modal-links a:hover {
    text-decoration: underline;
}

.thermas-consent-message {
    margin-top: 0.75rem;
    padding: 0.625rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

.thermas-consent-message.success {
    background: #dcfce7;
    color: #166534;
}

.thermas-consent-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Consent Trigger Button - Left side tab with arrow */
.thermas-consent-trigger-wrapper {
    position: fixed;
    left: 0;
    top: 35%;
    transform: translateY(0);
    z-index: 10008;
    display: flex;
    align-items: center;
}

.thermas-consent-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 56px;
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-family: inherit;
}

.thermas-consent-trigger:hover {
    background: #f9fafb;
    color: #003e6f;
    width: 40px;
}

.thermas-consent-trigger svg {
    width: 18px;
    height: 18px;
}

.thermas-consent-trigger .arrow {
    transition: transform 0.2s ease;
}

.thermas-consent-trigger-wrapper:hover .arrow {
    transform: translateX(2px);
}

@media (max-width: 640px) {
    .thermas-consent-trigger-wrapper {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .thermas-consent-trigger {
        width: 32px;
        height: 48px;
    }

    .thermas-consent-trigger svg {
        width: 16px;
        height: 16px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .thermas-cookie-banner,
    .thermas-modal-content {
        animation: none;
    }
}

/* Checkout Consent - Above payment button */
.thermas-checkout-consents {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.thermas-checkout-consents .thermas-checkbox-label {
    align-items: flex-start;
}

.thermas-checkout-consents .thermas-checkbox-input {
    margin-top: 2px;
    min-width: 16px;
    width: 16px;
    height: 16px;
}

.thermas-checkout-consents .text-xs {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Privacy Policy Modal */
.thermas-privacy-modal-content,
.thermas-terms-modal-content {
    max-width: 600px;
    max-height: 85vh;
}

.thermas-privacy-modal-body,
.thermas-terms-modal-body {
    max-height: calc(85vh - 130px);
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.thermas-privacy-content h3,
.thermas-terms-content h3 {
    margin-top: 1rem;
}

.thermas-privacy-content h3:first-child,
.thermas-terms-content h3:first-child {
    margin-top: 0;
}

/* Checkout - Reorder consent checkbox between payment options and button */
.woocommerce-checkout-payment {
    order: 1;
}

.thermas-checkout-consents {
    order: 2;
}

/* Ensure payment section is flex column on checkout */
.woocommerce-checkout-payment,
.woocommerce-checkout-payment ul.payment_methods {
    display: flex;
    flex-direction: column;
}

.woocommerce-checkout-payment ul.payment_methods {
    order: 1;
}

.woocommerce-checkout-payment .form-row {
    order: 3;
    margin-top: 1rem;
}

.woocommerce-checkout-payment .thermas-checkout-consents {
    order: 2;
    margin-top: 1rem;
}
