/**
 * Cookie Information Notice Styles
 * FIP.AL - Financiarisht i Pavarur
 *
 * Informational banner for essential cookies (no consent required)
 * GDPR compliant - essential cookies under Art. 6(1)(f) don't require consent
 *
 * @version 2.0.0
 * @date 2025-11-15
 */

/* ===================================
   Simple Cookie Notice Banner
   =================================== */

.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    margin: 0 auto;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-notice-content {
    background: white;
    border: 2px solid #4f46e5;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
}

.cookie-notice-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.cookie-notice-text strong {
    color: #111827;
    display: block;
    margin-bottom: 4px;
}

.cookie-notice-link {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-notice-link:hover {
    color: #4338ca;
}

.cookie-notice-dismiss {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.cookie-notice-dismiss:hover {
    background: #4338ca;
}

.cookie-notice-dismiss:focus {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .cookie-notice {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }

    .cookie-notice-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-notice-dismiss {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-notice {
        transition: none;
    }
}

@media print {
    .cookie-notice {
        display: none !important;
    }
}

/* ===================================
   LEGACY: Complex Cookie Consent Modal
   (Kept for future use if non-essential cookies added)
   =================================== */

/* ===================================
   Cookie Consent Banner Container
   =================================== */

.cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: cookieFadeIn 0.3s ease-out;
}

.cookie-consent-hiding {
    animation: cookieFadeOut 0.3s ease-out forwards;
}

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

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

/* Overlay */
.cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

/* Modal Container */
.cookie-consent-modal {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: cookieSlideUp 0.3s ease-out;
}

@keyframes cookieSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================
   Header Section
   =================================== */

.cookie-consent-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-consent-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cookie-consent-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   Body Section (Cookie Categories)
   =================================== */

.cookie-consent-body {
    padding: 24px 32px;
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for webkit browsers */
.cookie-consent-body::-webkit-scrollbar {
    width: 8px;
}

.cookie-consent-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.cookie-consent-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.cookie-consent-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Cookie Category */
.cookie-category {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.cookie-category-disabled {
    opacity: 0.6;
    background: #f3f4f6;
}

/* Category Header */
.cookie-category-header {
    margin-bottom: 12px;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    gap: 12px;
}

.cookie-category-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4f46e5;
}

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

.cookie-category-name {
    flex: 1;
}

/* Badges */
.cookie-badge-required,
.cookie-badge-optional,
.cookie-badge-disabled {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.cookie-badge-required {
    background: #dbeafe;
    color: #1e40af;
}

.cookie-badge-optional {
    background: #fef3c7;
    color: #92400e;
}

.cookie-badge-disabled {
    background: #e5e7eb;
    color: #6b7280;
}

/* Category Description */
.cookie-category-description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 8px 0;
}

/* Cookie List */
.cookie-category-list {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0;
    font-family: 'Monaco', 'Courier New', monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Provider Info */
.cookie-category-provider {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 12px 0 0 0;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.cookie-category-provider a {
    color: #4f46e5;
    text-decoration: underline;
}

.cookie-category-provider a:hover {
    color: #4338ca;
}

/* ===================================
   Footer Section
   =================================== */

.cookie-consent-footer {
    padding: 24px 32px 32px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
}

/* Buttons Container */
.cookie-consent-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .cookie-consent-buttons {
        grid-template-columns: 1fr;
    }
}

/* Button Styles */
.cookie-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-btn:active {
    transform: translateY(0);
}

/* Reject Button */
.cookie-btn-reject {
    background: white;
    color: #dc2626;
    border-color: #dc2626;
}

.cookie-btn-reject:hover {
    background: #dc2626;
    color: white;
}

/* Essential Only Button */
.cookie-btn-essential {
    background: white;
    color: #6b7280;
    border-color: #d1d5db;
}

.cookie-btn-essential:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Accept All Button */
.cookie-btn-accept {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.cookie-btn-accept:hover {
    background: #059669;
    border-color: #059669;
}

/* Save Preferences Button */
.cookie-btn-save {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.cookie-btn-save:hover {
    background: #4338ca;
    border-color: #4338ca;
}

/* Links */
.cookie-consent-links {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.cookie-consent-links a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-consent-links a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 10px;
        align-items: flex-end;
    }

    .cookie-consent-modal {
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }

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

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

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

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

    .cookie-category {
        padding: 16px;
    }

    .cookie-btn {
        padding: 14px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-header h2 {
        font-size: 18px;
    }

    .cookie-consent-description {
        font-size: 14px;
    }

    .cookie-category-label {
        font-size: 15px;
    }

    .cookie-category-description,
    .cookie-category-list,
    .cookie-category-provider {
        font-size: 13px;
    }
}

/* ===================================
   Accessibility
   =================================== */

/* Focus styles for keyboard navigation */
.cookie-btn:focus,
.cookie-category-label input:focus {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-modal {
        border: 3px solid #000;
    }

    .cookie-category {
        border-width: 3px;
    }

    .cookie-btn {
        border-width: 3px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-consent-modal,
    .cookie-btn {
        animation: none;
        transition: none;
    }

    .cookie-btn:hover {
        transform: none;
    }
}

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