/**
 * GDPR Cookie Consent Styles
 */

/* CSS Custom Properties for easy customization */
:root {
    --cookie-consent-z-index: 999999;
    --cookie-consent-primary-color: #147b74;
    --cookie-consent-primary-hover: #126a64;
}

/* Modal Overlay and Container */
.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--cookie-consent-z-index);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.cookie-consent-container {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: cookie-modal-appear 0.3s ease-out;
}

@keyframes cookie-modal-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.cookie-consent-header {
    background: linear-gradient(135deg, #147b74 0%, #1a9e95 100%);
    color: #ffffff;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
}

.cookie-consent-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* Body */
.cookie-consent-body {
    padding: 25px;
}

.cookie-consent-body > p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Cookie Categories */
.cookie-consent-categories {
    margin-bottom: 20px;
}

.cookie-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    background: #fafafa;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: #147b74;
}

.cookie-category-header {
    margin-bottom: 8px;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.cookie-category-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #147b74;
}

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

.cookie-category-title {
    font-size: 15px;
    color: #333;
}

.cookie-category-required {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
    font-weight: normal;
}

.cookie-category-desc {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    padding-left: 28px;
}

/* Links */
.cookie-consent-links {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}

.cookie-consent-links a {
    color: #147b74;
    text-decoration: none;
}

.cookie-consent-links a:hover {
    text-decoration: underline;
}

/* Footer Buttons */
.cookie-consent-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 130px;
}

.cookie-consent-btn:focus {
    outline: 2px solid #147b74;
    outline-offset: 2px;
}

.cookie-consent-reject {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}

.cookie-consent-reject:hover {
    background: #e8e8e8;
}

.cookie-consent-save {
    background: #ffffff;
    color: #147b74;
    border: 2px solid #147b74;
}

.cookie-consent-save:hover {
    background: #f0faf9;
}

.cookie-consent-accept {
    background: linear-gradient(135deg, #147b74 0%, #1a9e95 100%);
    color: #ffffff;
}

.cookie-consent-accept:hover {
    background: linear-gradient(135deg, #126a64 0%, #178a83 100%);
}

/* Floating Preferences Button */
.cookie-preferences-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #147b74;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.cookie-preferences-btn:hover {
    background: #126a64;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cookie-preferences-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .cookie-consent-container {
        width: 95%;
        max-height: 85vh;
    }

    .cookie-consent-header {
        padding: 15px 20px;
    }

    .cookie-consent-header h2 {
        font-size: 18px;
    }

    .cookie-consent-body {
        padding: 20px;
    }

    .cookie-consent-footer {
        flex-direction: column;
        padding: 15px 20px;
    }

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

    .cookie-preferences-btn {
        bottom: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* Cookie Policy Page Styles */
.cookie-policy-section {
    margin-bottom: 30px;
}

.cookie-policy-section h2 {
    color: #147b74;
    margin-bottom: 15px;
}

.cookie-policy-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cookie-table th,
.cookie-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.cookie-table th {
    background-color: #147b74;
    color: white;
}

.cookie-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.cookie-table tr:hover {
    background-color: #f5f5f5;
}

.manage-cookies-btn {
    display: inline-block;
    background: #147b74;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: background 0.2s;
}

.manage-cookies-btn:hover {
    background: #126a64;
}

/* Consent Log Page Styles */
.consent-log-container {
    max-width: 1000px;
    margin: 0 auto;
}

.consent-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.consent-log-header h2 {
    margin: 0;
    color: #333;
}

.consent-log-actions {
    display: flex;
    gap: 10px;
}

.consent-log-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.consent-log-table th,
.consent-log-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.consent-log-table th {
    background-color: #147b74;
    color: white;
    font-weight: 500;
}

.consent-log-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.consent-log-table tr:hover {
    background-color: #f0f0f0;
}

.consent-status-yes {
    color: #147b74;
    font-weight: 500;
}

.consent-status-no {
    color: #d32f2f;
    font-weight: 500;
}

.consent-log-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.refresh-btn {
    background: #147b74;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #126a64;
}

.export-btn {
    background: #fff;
    color: #147b74;
    padding: 10px 20px;
    border: 2px solid #147b74;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.export-btn:hover {
    background: #f0faf9;
}
