/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 33, 71, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(4px);
}

.cookie-consent-banner.show {
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent-container {
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
    max-width: 950px;
    width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 33, 71, 0.18);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s forwards;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid rgba(44, 114, 194, 0.08);
    display: flex;
    flex-direction: column;
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 33, 71, 0.08);
    padding-bottom: 0.75rem;
    flex-shrink: 0;
}

.cookie-header h3 {
    margin: 0;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    color: #002147;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-header h3::before {
    content: '';
    display: inline-block;
    width: clamp(18px, 4vw, 24px);
    height: clamp(18px, 4vw, 24px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232c72c2' d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 2.18l7 3.12v4.7c0 4.67-3.13 8.96-7 10.12-3.87-1.16-7-5.45-7-10.12V6.3l7-3.12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.cookie-close {
    background: rgba(0, 33, 71, 0.05);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.25rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-close:hover {
    color: #002147;
    transform: rotate(90deg);
    background: rgba(0, 33, 71, 0.1);
}

.cookie-content {
    margin-bottom: 0.75rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 180px);
}

.cookie-content p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: #475569;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.cookie-details {
    margin-top: 0.75rem;
    background: rgba(240, 249, 255, 0.5);
    border-radius: 12px;
    padding: clamp(0.6rem, 2vw, 1rem);
    border: 1px solid rgba(44, 114, 194, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
}

.cookie-option {
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    border-bottom: none;
    width: 100%;
    position: relative;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    box-sizing: border-box;
}

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

.cookie-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cookie-option-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.cookie-option-text {
    flex: 1;
    padding-right: 1rem;
}

.cookie-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0;
    color: #0f172a;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.cookie-description {
    display: block;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: #64748b;
    line-height: 1.5;
}

/* Toggle Switch Styles - iOS Style */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(203, 213, 225, 0.8);
    transition: .3s;
    border-radius: 28px;
}

.cookie-switch-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-switch input:checked + .cookie-switch-slider {
    background-color: #4178DC;
}

.cookie-switch input:focus + .cookie-switch-slider {
    box-shadow: 0 0 2px #4178DC;
}

.cookie-switch input:disabled + .cookie-switch-slider {
    background-color: rgba(203, 213, 225, 0.8);
    opacity: 0.7;
    cursor: not-allowed;
}

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

/* Toggle Labels */
.cookie-switch-labels {
    position: absolute;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    pointer-events: none;
}

.cookie-switch-labels .on {
    position: absolute;
    left: 10px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.cookie-switch-labels .off {
    position: absolute;
    right: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.3s;
}

.cookie-switch input:checked ~ .cookie-switch-labels .on {
    opacity: 1;
}

.cookie-switch input:checked ~ .cookie-switch-labels .off {
    opacity: 0;
}

.cookie-option input[type="checkbox"] {
    position: relative;
    width: 18px;
    height: 18px;
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #2c72c2;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s;
    background-color: white;
    flex-shrink: 0;
    display: none; /* Hide the original checkboxes */
}

.cookie-option input[type="checkbox"]:checked {
    background-color: #2c72c2;
}

.cookie-option input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cookie-option input[type="checkbox"]:disabled {
    border-color: #94a3b8;
    background-color: #f1f5f9;
}

.cookie-option input[type="checkbox"]:disabled:checked::before {
    border-color: #64748b;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 33, 71, 0.08);
}

.cookie-btn {
    padding: clamp(0.6rem, 2vw, 0.875rem) clamp(1.25rem, 3vw, 2rem);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-width: clamp(120px, 25%, 150px);
    text-align: center;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.01em;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.cookie-btn-primary {
    background: #4178DC;
    color: white;
    border-color: transparent;
}

.cookie-btn-primary:hover {
    background: #3461B9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(65, 120, 220, 0.2);
}

.cookie-btn-outline {
    background-color: transparent;
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.3);
}

.cookie-btn-outline:hover {
    background-color: rgba(100, 116, 139, 0.05);
    border-color: rgba(100, 116, 139, 0.5);
    transform: translateY(-2px);
}

.cookie-footer {
    display: none;
}

/* Bottom Strip Cookie Notice */
.cookie-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 15px rgba(0, 33, 71, 0.12);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    border-top: 1px solid rgba(44, 114, 194, 0.1);
    backdrop-filter: blur(10px);
}

.cookie-strip.show {
    transform: translateY(0);
}

.cookie-strip-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 1rem) clamp(1.25rem, 4vw, 1rem);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-strip-text {
    flex: 1;
    margin: 0 clamp(1rem, 3vw, 2rem) 0.5rem 0;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: #333;
    line-height: 1.6;
    min-width: 250px;
}

.cookie-strip-text a {
    color: #2c72c2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    padding: 0;
}

.cookie-strip-text a:hover {
    color: #007AFF;
    border-bottom-color: #007AFF;
}

.cookie-strip-buttons {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex-wrap: wrap;
}

.cookie-strip-btn {
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.cookie-strip-btn.outline {
    background-color: transparent;
    border: 1px solid #2c72c2;
    color: #2c72c2;
}

.cookie-strip-btn.outline:hover {
    background-color: rgba(44, 114, 194, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 114, 194, 0.1);
}

.cookie-strip-btn.secondary {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.cookie-strip-btn.secondary:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.cookie-strip-btn.primary {
    background: linear-gradient(135deg, #007AFF, #2c72c2);
    border: 1px solid transparent;
    color: white;
}

.cookie-strip-btn.primary:hover {
    background: linear-gradient(135deg, #0062CC, #245ca0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 114, 194, 0.2);
}

/* Privacy Button - Bottom Left Corner */
.privacy-button-container {
    position: fixed;
    left: clamp(15px, 5vw, 24px);
    bottom: 30px; /* Match scroll-to-top button height */
    z-index: 999;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.5s forwards;
    transition: transform 0.3s ease;
}

.privacy-button-container:hover {
    transform: translateY(-3px);
}

.privacy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    border: 1px solid rgba(44, 114, 194, 0.2);
    border-radius: 30px;
    padding: clamp(8px, 2vw, 12px) clamp(14px, 3vw, 20px);
    box-shadow: 0 3px 15px rgba(0, 33, 71, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.privacy-button:hover {
    box-shadow: 0 8px 20px rgba(0, 33, 71, 0.15);
    border-color: rgba(44, 114, 194, 0.3);
    background: linear-gradient(to right, white, #f0f9ff);
}

/* Icon-only privacy button style */
.privacy-button.icon-only {
    width: 50px;
    height: 50px; /* Match scroll-to-top button size */
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 33, 71, 0.1);
    border: 1px solid rgba(44, 114, 194, 0.1);
    overflow: hidden;
}

.privacy-button.icon-only::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.privacy-button.icon-only:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 33, 71, 0.15);
    background: #f8fafc;
}

.privacy-button.icon-only:hover::before {
    opacity: 1;
}

.privacy-button.icon-only:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 33, 71, 0.1);
}

.privacy-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c72c2;
    font-size: 1.4rem;
    position: relative;
    z-index: 2;
    animation: subtle-bounce 4s infinite;
}

.privacy-button span {
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 600;
    color: #0f172a;
}

@keyframes subtle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

/* Cookie confirmation message */
.cookie-confirmation {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    color: #0f172a;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 33, 71, 0.12);
    z-index: 9997;
    max-width: 300px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid rgba(44, 114, 194, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-confirmation.show {
    transform: translateY(0);
    opacity: 1;
}

/* Animation for showing the cookie consent banner */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes expandOptions {
    0% {
        max-height: 0;
        opacity: 0;
    }
    100% {
        max-height: 600px;
        opacity: 1;
    }
}

/* Responsive styles for the cookie strip */
@media (max-width: 768px) {
    .cookie-section {
        flex-direction: column;
    }
    
    .cookie-option {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .cookie-option:last-child {
        margin-bottom: 0;
    }
    
    .cookie-strip-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    
    .cookie-strip-text {
        margin-bottom: 1.25rem;
        width: 100%;
        margin-right: 0;
    }
    
    .cookie-strip-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .cookie-consent-container {
        padding: 1.25rem;
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-actions {
        justify-content: space-between;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: auto;
    }
    
    .cookie-details {
        flex-direction: column;
    }
    
    .cookie-option {
        width: 100%;
        padding-bottom: 0.4rem;
        margin-bottom: 0.4rem;
    }
}

@media (min-width: 769px) {
    .cookie-section {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0;
        justify-content: space-between;
    }
    
    .cookie-option {
        width: calc(50% - 0.5rem);
        box-sizing: border-box;
        margin-bottom: 1rem;
    }
    
    .cookie-option:nth-child(odd) {
        margin-right: 0;
    }
    
    .cookie-option:nth-child(even) {
        margin-left: 0;
    }
    
    .cookie-option:last-child {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Special case for when there are only 3 options */
    .cookie-option:nth-last-child(1):nth-child(3) {
        width: 100%;
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .cookie-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-strip-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .cookie-strip-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-consent-container {
        padding: 0.85rem;
        width: 100%;
        max-height: 85vh;
    }
    
    .cookie-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .cookie-content {
        max-height: calc(80vh - 140px);
    }
    
    .cookie-content p {
        margin-bottom: 0.5rem;
    }
    
    .cookie-details {
        margin-top: 0.5rem;
        padding: 0.5rem;
    }
    
    .cookie-section {
        gap: 0.5rem;
    }
    
    .cookie-option {
        padding: 0.65rem;
    }
    
    .cookie-switch {
        width: 44px;
        height: 24px;
    }
    
    .cookie-switch-slider:before {
        height: 20px;
        width: 20px;
    }
    
    .cookie-switch input:checked + .cookie-switch-slider:before {
        transform: translateX(20px);
    }
    
    .cookie-option-content {
        gap: 0.5rem;
    }
    
    .cookie-actions {
        padding-top: 0.5rem;
    }
}

/* Specific fixes for very small screens */
@media (max-width: 350px) {
    .cookie-header h3::before {
        display: none;
    }
    
    .cookie-strip-text {
        font-size: 0.85rem;
    }
    
    .cookie-strip-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .privacy-button span {
        font-size: 11px;
    }
}

@media (min-width: 768px) {
    /* Removing this conflicting rule */
    /* .cookie-section {
        flex-direction: column;
        gap: 0.75rem;
    } */
}

@media (max-width: 767px) {
    .cookie-consent-container {
        padding: 1rem;
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-content {
        max-height: calc(85vh - 150px);
    }
    
    .cookie-option {
        padding: 0.75rem;
    }
    
    .cookie-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
    
    .cookie-option-header {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .cookie-option-header {
        margin-bottom: 0.5rem;
    }
    
    .cookie-title {
        font-size: 0.95rem;
    }
    
    .cookie-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .cookie-switch {
        width: 46px;
        height: 24px;
    }
    
    .cookie-switch-slider:before {
        height: 20px;
        width: 20px;
    }
    
    .cookie-switch input:checked + .cookie-switch-slider:before {
        transform: translateX(22px);
    }
    
    .cookie-switch-labels .on,
    .cookie-switch-labels .off {
        font-size: 10px;
    }
} 