/**
 * CookieControl Banner Styles
 * Development version - will be minified for production
 */

/* Banner container */
.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 999999;
    display: none;
}

/* Position variants */
.cc-banner-bottom {
    bottom: 0;
    animation: cc-slide-up 0.4s ease-out;
}

.cc-banner-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: cc-slide-down 0.4s ease-out;
}

/* Banner content wrapper */
.cc-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Banner text */
.cc-banner-text {
    flex: 1;
    font-size: inherit;
    font-family: inherit;
    color: #333;
    line-height: 1.5;
}

/* Banner actions */
.cc-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Buttons */
.cc-btn {
    font-family: inherit;
    font-size: 14px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-weight: 500;
}

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

.cc-btn:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Accept button */
.cc-btn-accept {
    color: #ffffff;
    /* Background color set inline from settings */
}

/* View Cookies button */
.cc-btn-view-cookies {
    background: #f5f5f5;
    color: #333;
}

.cc-btn-view-cookies:hover {
    background: #e5e5e5;
}

/* Close button */
.cc-btn-close {
    background: transparent;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.cc-btn-close:hover {
    color: #333;
}

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

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

/* Tablet and mobile responsiveness */
@media (max-width: 768px) {
    .cc-banner {
        padding: 16px;
    }

    .cc-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cc-banner-text {
        font-size: 14px;
    }

    .cc-banner-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .cc-btn {
        font-size: 13px;
        padding: 10px 20px;
    }

    .cc-banner-actions {
        flex-direction: column;
        gap: 8px;
    }

    .cc-btn-accept {
        width: 100%;
    }
}

/* ========================================
   Cookie List Modal Styles
   ======================================== */

/* Modal container - hidden by default */
.cc-cookie-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999999 !important;
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Modal open state */
.cc-cookie-modal.cc-modal-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Modal overlay */
.cc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* Modal content container */
.cc-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    flex-direction: column;
    animation: cc-modal-fade-in 0.3s ease-out;
}

/* Modal header */
.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.cc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    font-family: inherit;
}

/* Modal body */
.cc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Modal footer */
.cc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Cookie category section */
.cc-cookie-category {
    margin-bottom: 32px;
}

.cc-cookie-category:last-child {
    margin-bottom: 0;
}

.cc-category-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    font-family: inherit;
}

/* Cookie table */
.cc-cookie-table-wrapper {
    overflow-x: auto;
    margin-bottom: 0;
}

.cc-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 14px;
}

.cc-cookie-table thead {
    background: #f5f5f5;
}

.cc-cookie-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.cc-cookie-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #555;
}

.cc-cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.cc-cookie-table tbody tr:hover {
    background: #f9f9f9;
}

.cc-cookie-name {
    font-weight: 500;
    color: #333;
}

/* No cookies message */
.cc-no-cookies {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    font-family: inherit;
}

/* Modal animation */
@keyframes cc-modal-fade-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal responsive styles */
@media (max-width: 768px) {
    .cc-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .cc-modal-header,
    .cc-modal-body,
    .cc-modal-footer {
        padding: 16px;
    }

    .cc-modal-header h2 {
        font-size: 20px;
    }

    .cc-category-title {
        font-size: 16px;
    }

    .cc-cookie-table {
        font-size: 13px;
    }

    .cc-cookie-table th,
    .cc-cookie-table td {
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .cc-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .cc-modal-header h2 {
        font-size: 18px;
    }

    .cc-cookie-table {
        font-size: 12px;
    }

    /* Stack table on very small screens */
    .cc-cookie-table thead {
        display: none;
    }

    .cc-cookie-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
        background: #fff;
    }

    .cc-cookie-table td {
        display: block;
        text-align: left;
        padding: 8px 12px;
        border-bottom: 1px solid #f5f5f5;
    }

    .cc-cookie-table td:last-child {
        border-bottom: none;
    }

    .cc-cookie-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #333;
    }

    .cc-cookie-name::before {
        content: 'Cookie Name: ';
    }

    .cc-cookie-description::before {
        content: 'Description: ';
    }

    .cc-cookie-duration::before {
        content: 'Duration: ';
    }
}
