/**
 * Cookie Consent Banner Styles
 *
 * @package Italica_Cookie_Consent
 */

/* Banner Styles */
.italica-cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    animation: slideUp 0.3s ease-out;
}

.italica-cookie-consent-banner.position-top {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

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

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

.italica-cookie-consent-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.italica-cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.italica-cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.italica-cookie-consent-accept-all {
    background: #222e45;
    color: #ffffff;
}

.italica-cookie-consent-accept-all:hover {
    background: #1a2336;
}

.italica-cookie-consent-reject-all {
    background: #ffffff;
    color: #333;
    border: 1px solid #ccc;
}

.italica-cookie-consent-reject-all:hover {
    background: #f5f5f5;
}

.italica-cookie-consent-settings {
    background: transparent;
    color: #222e45;
    border: 1px solid #222e45;
}

.italica-cookie-consent-settings:hover {
    background: #222e45;
    color: #ffffff;
}

/* Modal Styles */
.italica-cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal when opened from tab - starts centered, slides down on close */
.italica-cookie-consent-modal.from-tab {
    align-items: center;
}

.italica-cookie-consent-modal.from-tab .italica-cookie-consent-modal-content {
    animation: none;
}

/* Animation when closing */
.italica-cookie-consent-modal.from-tab.closing .italica-cookie-consent-modal-content {
    animation: slideDownToBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.italica-cookie-consent-modal.from-tab.closing {
    align-items: flex-end;
}

@keyframes slideDownToBottom {
    from {
        transform: translateY(0);
        opacity: 1;
        border-radius: 12px;
    }
    to {
        transform: translateY(calc(100vh - 120px));
        opacity: 0.8;
        border-radius: 12px 12px 0 0;
    }
}

.italica-cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.italica-cookie-consent-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    z-index: 1;
    margin-bottom: -1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.italica-cookie-consent-modal.from-tab.centered .italica-cookie-consent-modal-content {
    border-radius: 12px;
    margin-bottom: 0;
}

.italica-cookie-consent-modal-content h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.italica-cookie-consent-modal-content p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
}

.italica-cookie-consent-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.italica-cookie-consent-category {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
}

.italica-cookie-consent-category-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.italica-cookie-consent-category-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.italica-cookie-consent-category-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.italica-cookie-consent-category-title {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.italica-cookie-consent-category-desc {
    font-size: 13px;
    color: #666;
    display: block;
    line-height: 1.5;
}

.italica-cookie-consent-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.italica-cookie-consent-save {
    background: #222e45;
    color: #ffffff;
}

.italica-cookie-consent-save:hover {
    background: #1a2336;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .italica-cookie-consent-banner {
        padding: 15px;
    }

    .italica-cookie-consent-buttons {
        flex-direction: column;
    }

    .italica-cookie-consent-btn {
        width: 100%;
    }

    .italica-cookie-consent-modal-content {
        padding: 20px;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .italica-cookie-consent-message {
        font-size: 13px;
    }

    .italica-cookie-consent-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Cookie preferences tab (bottom center) */
.italica-cookie-consent-tab {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999998;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.italica-cookie-consent-tab.hidden {
    display: none;
}

.italica-cookie-consent-tab-inner {
    background: #ffffff;
    color: #222e45;
    padding: 2px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e0e0e0;
    border-bottom: none;
    width: 250px;
    height: 15px;
}

.italica-cookie-consent-tab:hover .italica-cookie-consent-tab-inner {
    background: #f9f9f9;
    padding-top: 16px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

.italica-cookie-consent-tab-icon {
    font-size: 22px;
}

.italica-cookie-consent-tab.opened .italica-cookie-consent-tab-inner {
    padding-bottom: 20px;
}

/* Print styles - hide banner when printing */
@media print {
    .italica-cookie-consent-banner,
    .italica-cookie-consent-modal,
    .italica-cookie-consent-tab {
        display: none !important;
    }
}

