/**
 * Noraitec Cookie Compliance - Frontend Styles
 */

/* Banner de cookies */
.ncc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background-color: var(--ncc-bg-color, #2c3e50);
    color: var(--ncc-text-color, #ffffff);
    padding: 1.5rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.ncc-banner--bottom {
    bottom: 0;
}

.ncc-banner--top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.ncc-banner__content {
    flex: 1;
    min-width: 300px;
}

.ncc-banner__title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.ncc-banner__text {
    margin: 0;
    opacity: 0.9;
}

.ncc-banner__text a {
    color: inherit;
    text-decoration: underline;
}

.ncc-banner__text a:hover {
    opacity: 0.8;
}

.ncc-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Botones */
.ncc-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ncc-btn--primary {
    background-color: var(--ncc-button-bg, #3498db);
    color: var(--ncc-button-text, #ffffff);
}

.ncc-btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ncc-btn--secondary {
    background-color: transparent;
    color: var(--ncc-text-color, #ffffff);
    border: 1px solid var(--ncc-text-color, #ffffff);
}

.ncc-btn--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal */
.ncc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ncc-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

.ncc-modal__content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: #333;
}

.ncc-modal__title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
}

/* Opciones de cookies */
.ncc-cookie-options {
    margin-bottom: 1.5rem;
}

.ncc-cookie-option {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.ncc-cookie-option:last-child {
    border-bottom: none;
}

.ncc-cookie-option__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ncc-cookie-option__label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.ncc-cookie-option__label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ncc-button-bg, #3498db);
}

.ncc-cookie-option__label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ncc-cookie-option__name {
    font-size: 1em;
    color: #2c3e50;
}

.ncc-cookie-option__required {
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

.ncc-cookie-option__desc {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Footer del modal */
.ncc-modal__footer {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.ncc-modal__link {
    color: var(--ncc-button-bg, #3498db);
    text-decoration: none;
    font-size: 0.9em;
}

.ncc-modal__link:hover {
    text-decoration: underline;
}

/* Acciones del modal */
.ncc-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.ncc-modal__actions .ncc-btn--primary {
    background-color: var(--ncc-button-bg, #3498db);
    color: var(--ncc-button-text, #ffffff);
}

.ncc-modal__actions .ncc-btn--secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.ncc-modal__actions .ncc-btn--secondary:hover {
    background-color: #eee;
}

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

    .ncc-banner__container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .ncc-banner__actions {
        justify-content: center;
    }

    .ncc-modal__content {
        padding: 1.5rem;
    }

    .ncc-modal__footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .ncc-modal__actions {
        flex-direction: column;
    }

    .ncc-modal__actions .ncc-btn {
        width: 100%;
    }
}

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

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

@keyframes ncc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ncc-banner--bottom.ncc-animate {
    animation: ncc-slide-up 0.3s ease-out;
}

.ncc-banner--top.ncc-animate {
    animation: ncc-slide-down 0.3s ease-out;
}

.ncc-modal.ncc-animate {
    animation: ncc-fade-in 0.2s ease-out;
}

.ncc-modal.ncc-animate .ncc-modal__content {
    animation: ncc-slide-up 0.3s ease-out;
}
