/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2E4057 0%, #1F2937 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(46, 64, 87, 0.3);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-banner[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
}

.cookie-banner:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #D1D5DB;
}

.cookie-text a {
    color: #C5282F;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-text a:hover {
    color: #A21E27;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    white-space: nowrap;
}

.cookie-btn.accept {
    background: linear-gradient(135deg, #C5282F 0%, #A21E27 100%);
    color: white;
}

.cookie-btn.accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(197, 40, 47, 0.3);
}

.cookie-btn.reject {
    background: transparent;
    color: #D1D5DB;
    border: 2px solid #4B5563;
}

.cookie-btn.reject:hover {
    background: #4B5563;
    color: white;
    border-color: #6B7280;
}

.cookie-btn.customize {
    background: transparent;
    color: #D1D5DB;
    border: 2px solid #C5282F;
}

.cookie-btn.customize:hover {
    background: #C5282F;
    color: white;
}

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 64, 87, 0.8);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.cookie-modal-header h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    color: #2E4057;
    margin: 0;
}

.cookie-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cookie-close:hover {
    background-color: #F3F4F6;
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
}

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

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

.cookie-category-header h4 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2E4057;
    margin: 0;
}

.cookie-category p {
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Cookie Switch Styles */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #C5282F;
}

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

input:disabled + .cookie-slider {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #E5E7EB;
}

.cookie-policy-link {
    color: #C5282F;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.cookie-policy-link:hover {
    color: #A21E27;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .cookie-btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    
    .cookie-modal {
        padding: 1rem;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem 0;
    }
    
    .cookie-content {
        padding: 0 15px;
        gap: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
    }
    
    .cookie-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .cookie-btn {
        min-width: 90px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .cookie-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}