/**
 * DarkHorse Cookie Consent Styles
 * Modern, user-friendly cookie consent banner and preferences modal
 */

/* Cookie Banner */
.dh-cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    padding: 24px;
    animation: slideUp 0.4s ease-out;
}

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

.dh-cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.dh-cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.dh-cookie-banner-text h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.dh-cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.dh-cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Buttons */
.dh-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.dh-btn-primary {
    background: linear-gradient(135deg, #00875A 0%, #00a86b 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 135, 90, 0.3);
}

.dh-btn-primary:hover {
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
    box-shadow: 0 4px 12px rgba(0, 135, 90, 0.4);
    transform: translateY(-1px);
}

.dh-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 135, 90, 0.3);
}

.dh-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dh-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dh-btn-link {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    padding: 12px 16px;
}

.dh-btn-link:hover {
    color: #ffffff;
}

/* Preferences Modal */
.dh-cookie-preferences {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(4px);
}

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

.dh-cookie-preferences-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

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

.dh-cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.dh-cookie-preferences-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.dh-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dh-close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.dh-cookie-preferences-body {
    padding: 24px;
}

.dh-cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.dh-cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dh-cookie-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dh-cookie-category-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.dh-cookie-status {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 4px;
}

.dh-cookie-category p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    padding-left: 48px;
}

/* Toggle Switch */
.dh-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.dh-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dh-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.dh-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dh-toggle input:checked + .dh-toggle-slider {
    background-color: #00875A;
}

.dh-toggle input:checked + .dh-toggle-slider:before {
    transform: translateX(24px);
}

.dh-toggle input:focus + .dh-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.2);
}

.dh-toggle input:disabled + .dh-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.dh-cookie-preferences-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.dh-cookie-preferences-footer .dh-btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
}

.dh-cookie-preferences-footer .dh-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.dh-cookie-preferences-footer .dh-btn-primary {
    background: linear-gradient(135deg, #00875A 0%, #00a86b 100%);
    color: #ffffff;
}

.dh-cookie-preferences-footer .dh-btn-primary:hover {
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dh-cookie-banner {
        padding: 20px;
    }
    
    .dh-cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dh-cookie-banner-text {
        min-width: auto;
        margin-bottom: 16px;
    }
    
    .dh-cookie-banner-text h3 {
        font-size: 18px;
    }
    
    .dh-cookie-banner-text p {
        font-size: 13px;
    }
    
    .dh-cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .dh-cookie-banner-actions .dh-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dh-cookie-preferences-content {
        max-height: 95vh;
        margin: 10px;
    }
    
    .dh-cookie-preferences-header {
        padding: 20px;
    }
    
    .dh-cookie-preferences-header h2 {
        font-size: 20px;
    }
    
    .dh-cookie-preferences-body {
        padding: 20px;
    }
    
    .dh-cookie-category p {
        padding-left: 0;
        margin-top: 8px;
    }
    
    .dh-cookie-preferences-footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .dh-cookie-preferences-footer .dh-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dh-cookie-banner {
        padding: 16px;
    }
    
    .dh-cookie-banner-text h3 {
        font-size: 16px;
    }
    
    .dh-cookie-banner-text p {
        font-size: 12px;
    }
    
    .dh-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Scrollbar styling for preferences modal */
.dh-cookie-preferences-content::-webkit-scrollbar {
    width: 8px;
}

.dh-cookie-preferences-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 12px;
}

.dh-cookie-preferences-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 12px;
}

.dh-cookie-preferences-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
