/* GDPR Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(44, 44, 44, 0.98);
    color: #F8F6F0;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid #E6D7C3;
    display: none;
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

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

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

.cookie-text {
    flex: 1;
    min-width: 0;
}

.cookie-text h4 {
    margin-bottom: 8px;
    color: #F8F6F0;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Noto Serif JP', serif;
}

.cookie-text p {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #E6D7C3;
}

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

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

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-btn.accept {
    background-color: #2D4A3A;
    color: #F8F6F0;
    border: 1px solid #2D4A3A;
}

.cookie-btn.accept:hover {
    background-color: #1F3329;
}

.cookie-btn.reject {
    background-color: transparent;
    color: #F8F6F0;
    border: 1px solid #F8F6F0;
}

.cookie-btn.reject:hover {
    background-color: #F8F6F0;
    color: #2C2C2C;
}

.cookie-btn.customize {
    background-color: #E6D7C3;
    color: #2C2C2C;
    border: 1px solid #E6D7C3;
}

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

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

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

.cookie-modal-content {
    background-color: #F8F6F0;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2C2C2C;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

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

.cookie-modal h3 {
    color: #2D4A3A;
    margin-bottom: 20px;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
}

.cookie-modal p {
    color: #2C2C2C;
    margin-bottom: 24px;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #E6D7C3;
    border-radius: 8px;
    background-color: #FFFFFF;
}

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

.cookie-category h4 {
    margin-bottom: 0;
    color: #2D4A3A;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-category p {
    font-size: 0.9rem;
    color: #4A4A4A;
    margin-bottom: 0;
    line-height: 1.5;
}

.cookie-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cookie-status.required {
    background-color: #E6D7C3;
    color: #2C2C2C;
}

.cookie-status.optional {
    background-color: #F5F5F5;
    color: #4A4A4A;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

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

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

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

input:checked + .toggle-slider {
    background-color: #2D4A3A;
}

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

.toggle-slider:hover {
    box-shadow: 0 0 8px rgba(45, 74, 58, 0.3);
}

/* Modal Action Buttons */
.cookie-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #E6D7C3;
}

.cookie-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.cookie-modal-btn.save {
    background-color: #2D4A3A;
    color: #F8F6F0;
}

.cookie-modal-btn.save:hover {
    background-color: #1F3329;
}

.cookie-modal-btn.accept-all {
    background-color: #E6D7C3;
    color: #2C2C2C;
}

.cookie-modal-btn.accept-all:hover {
    background-color: #D4C5A8;
}

.cookie-modal-btn.reject-all {
    background-color: transparent;
    color: #2C2C2C;
    border: 1px solid #8A8A8A;
}

.cookie-modal-btn.reject-all:hover {
    background-color: #8A8A8A;
    color: #F8F6F0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 80px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .cookie-modal-content {
        padding: 24px;
        margin: 10px;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-modal-btn {
        width: 100%;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-text h4 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.85rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .cookie-modal-content {
        padding: 20px;
    }
}