/**
 * Alamarte Cookie Consent - Styles
 * @package     Alamarte.Plugin
 * @subpackage  System.CookieConsent
 * @author      Andrés Restrepo <info@alamarte.com>
 * @copyright   Copyright (C) 2026 ALAMARTE Ingeniería
 * @license     GNU General Public License version 3 or later
 */

/* Banner Base */
.acc-banner {
    position: fixed;
    left: 0;
    right: 0;
    background-color: var(--acc-bg-color, #1a1a2e);
    color: var(--acc-text-color, #ffffff);
    z-index: var(--acc-zindex, 999999);
    padding: 1rem;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.acc-banner.acc-hidden {
    display: none !important;
}

.acc-banner-inner {
    max-width: var(--acc-width, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Positions */
.acc-position-bottom-bar {
    bottom: 0;
}

.acc-position-top-bar {
    top: 0;
}

.acc-position-modal-center {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.acc-position-modal-center .acc-banner-inner {
    flex-direction: column;
    text-align: center;
}

.acc-position-corner-left,
.acc-position-corner-right {
    bottom: 20px;
    width: 350px;
    max-width: calc(100% - 40px);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.acc-position-corner-left {
    left: 20px;
    right: auto;
}

.acc-position-corner-right {
    right: 20px;
    left: auto;
}

.acc-position-corner-left .acc-banner-inner,
.acc-position-corner-right .acc-banner-inner {
    flex-direction: column;
}

/* Content */
.acc-header {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

.acc-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--acc-text-color, #ffffff);
    text-align: center;
    width: 100%;
}

.acc-icon {
    font-size: 3rem;
    margin: 0.5rem 0;
    color: #f4a460;
}

.acc-icon i {
    display: inline-block;
    animation: acc-cookie-wobble 1s ease-in-out;
}

@keyframes acc-cookie-wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.acc-content {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.acc-text {
    margin: 0 0 0.5rem 0;
}

.acc-privacy-link {
    color: var(--acc-text-color, #ffffff);
    text-decoration: underline;
    opacity: 0.9;
}

.acc-privacy-link:hover {
    opacity: 1;
}

/* Buttons */
.acc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.acc-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.acc-btn:hover {
    opacity: 0.9;
}

.acc-btn:active {
    transform: scale(0.98);
}

.acc-btn-accept {
    background-color: var(--acc-btn-accept-bg, #4CAF50);
    color: var(--acc-btn-accept-text, #ffffff);
}

.acc-btn-reject {
    background-color: var(--acc-btn-reject-bg, #f44336);
    color: var(--acc-btn-reject-text, #ffffff);
}

.acc-btn-settings {
    background-color: var(--acc-btn-settings-bg, #607D8B);
    color: var(--acc-btn-settings-text, #ffffff);
}

.acc-btn-save {
    background-color: var(--acc-btn-accept-bg, #4CAF50);
    color: var(--acc-btn-accept-text, #ffffff);
    width: 100%;
    margin-top: 0.5rem;
}

/* GDPR Panel */
.acc-gdpr-panel {
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 1rem;
}

.acc-category {
    margin-bottom: 0.75rem;
}

.acc-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.acc-category-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.acc-category-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.acc-category-desc {
    margin: 0.25rem 0 0 1.75rem;
    font-size: 12px;
    opacity: 0.8;
}

/* Overlay for modal */
.acc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--acc-zindex, 999999) - 1);
}

.acc-overlay.acc-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .acc-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    .acc-buttons {
        justify-content: center;
        width: 100%;
    }

    .acc-btn {
        flex: 1;
        min-width: 100px;
    }

    .acc-position-corner-left,
    .acc-position-corner-right {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
}

/* Print */
@media print {
    .acc-banner,
    .acc-overlay {
        display: none !important;
    }
}

/* Test Mode Badge */
.acc-test-mode-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    background-color: #ff9800;
    color: #000;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
    z-index: 1;
}
