/**
 * GDPR Cookie Consent Banner Styles
 * Left-side positioned banner for Puls Vet
 * Small cookie button trigger on left side
 */

/* Cookie Button - Small trigger icon on left side */
.cookie-consent-button {
    position: fixed;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50% 0 0 50%;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                transform 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.cookie-consent-button .cookie-icon {
    font-size: 1.5rem;
    display: block;
    transition: transform 0.2s ease;
    line-height: 1;
}

.cookie-consent-button-show {
    left: 0;
    opacity: 1;
    visibility: visible;
}

.cookie-consent-button-hide {
    left: -60px;
    opacity: 0;
    visibility: hidden;
}

.cookie-consent-button:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.cookie-consent-button:hover .cookie-icon {
    transform: scale(1.1) rotate(15deg);
}

.cookie-consent-button:active {
    transform: translateY(-50%) scale(0.95);
}

/* Pulse animation for attention */
@keyframes cookiePulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(102, 126, 234, 0.7);
    }
}

.cookie-consent-button-show {
    animation: cookiePulse 2s ease-in-out infinite;
}

/* Cookie Consent Banner Container */
.cookie-consent-banner {
    position: fixed;
    left: -400px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-width: 90vw;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 0 15px 15px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                visibility 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.cookie-consent-banner-show {
    left: 0;
    opacity: 1;
    visibility: visible;
}

.cookie-consent-banner-hide {
    left: -400px;
    opacity: 0;
    visibility: hidden;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.cookie-consent-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0 15px 0 0;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-consent-icon {
    font-size: 1.5rem;
}

/* Body */
.cookie-consent-body {
    padding: 1.5rem;
    flex: 1;
}

.cookie-consent-body p {
    margin: 0 0 1.25rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
}

/* Cookie Options */
.cookie-consent-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-consent-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.cookie-consent-option:hover {
    background-color: #f8f9fa;
}

.cookie-consent-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.cookie-consent-checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-consent-option input[type="checkbox"]:checked ~ .cookie-consent-checkbox-custom {
    background-color: #667eea;
}

.cookie-consent-option input[type="checkbox"]:checked ~ .cookie-consent-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.cookie-consent-option input[type="checkbox"]:disabled ~ .cookie-consent-checkbox-custom {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

.cookie-consent-label-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.cookie-consent-label-text strong {
    color: #2c4964;
    font-weight: 600;
}

.cookie-consent-label-text small {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Footer */
.cookie-consent-footer {
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0 0 15px 0;
    border-top: 1px solid #e9ecef;
}

.cookie-consent-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
}

.cookie-consent-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cookie-consent-btn-reject {
    background-color: #6c757d;
    color: white;
}

.cookie-consent-btn-reject:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.cookie-consent-btn-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cookie-consent-btn-accept:hover {
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

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

/* Cookie Button Responsive */
@media (max-width: 768px) {
    .cookie-consent-button {
        top: auto;
        bottom: 80px;
        left: -50px;
        width: 45px;
        height: 45px;
        border-radius: 50% 0 0 50%;
        transform: none;
    }

    .cookie-consent-button-show {
        left: 0;
    }

    .cookie-consent-button-hide {
        left: -50px;
    }

    .cookie-consent-button:hover {
        transform: scale(1.05);
    }

    .cookie-consent-button:active {
        transform: scale(0.95);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cookie-consent-banner {
        width: 90vw;
        left: -100vw;
        border-radius: 15px;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .cookie-consent-banner-show {
        left: 5vw;
    }

    .cookie-consent-banner-hide {
        left: -100vw;
    }

    .cookie-consent-header {
        border-radius: 15px 15px 0 0;
    }

    .cookie-consent-footer {
        border-radius: 0 0 15px 15px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

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

/* Scrollbar styling for banner content */
.cookie-consent-banner::-webkit-scrollbar {
    width: 6px;
}

.cookie-consent-banner::-webkit-scrollbar-track {
    background: transparent;
}

.cookie-consent-banner::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.cookie-consent-banner::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-consent-checkbox-custom,
    .cookie-consent-option,
    .cookie-consent-btn {
        transition: none !important;
    }
}
