@charset "utf-8";

/* Cookie Icon (Bottom Left) - 提高z-index确保始终在最上层 */
.cookie-icon-trigger {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    z-index: 99999 !important;
    cursor: pointer;
    width: 55px;
    height: 55px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.cookie-icon-trigger.show {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.cookie-icon-trigger:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(218, 5, 2, 0.4);
    background: #f8f8f8;
}

.cookie-icon-trigger svg {
    width: 30px;
    height: 30px;
}

/* Cookie Preference Panel - 提高z-index */
.cookie-preference-panel {
    position: fixed;
    width: 400px;
    height: 100%;
    right: 0;
    top: 0;
    z-index: 99998 !important;
    background: #2c3e50;
    color: #fff;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.cookie-preference-panel.active {
    transform: translateX(0);
}

.cookie-panel-header {
    position: sticky;
    top: 0;
    background: #2c3e50;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.cookie-panel-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.cookie-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.cookie-panel-body {
    padding: 20px;
}

.cookie-description {
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #27ae60;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:disabled+.toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-switch input:disabled+.toggle-slider:before {
    background-color: #999;
}

.cookie-category-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.cookie-details-link {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
}

.cookie-details-link:hover {
    text-decoration: underline;
    color: #5dade2;
}

/* Cookie Details (Expandable) */
.cookie-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-details.show {
    display: block;
}

.cookie-detail-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cookie-detail-item:last-child {
    margin-bottom: 0;
}

.cookie-detail-row {
    display: flex;
    margin-bottom: 5px;
    font-size: 13px;
}

.cookie-detail-row:last-child {
    margin-bottom: 0;
}

.cookie-detail-label {
    color: rgba(255, 255, 255, 0.6);
    min-width: 80px;
    flex-shrink: 0;
}

.cookie-detail-value {
    color: rgba(255, 255, 255, 0.9);
    word-break: break-all;
}

/* Panel Footer */
.cookie-panel-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.cookie-save-btn {
    background: #da0502;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.cookie-save-btn:hover {
    background: #b00402;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 5, 2, 0.4);
}

.cookie-tech-support {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Cookie Overlay */
.cookie-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99997 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cookie-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Responsive - 手机端优化 */
@media (max-width: 768px) {
    .cookie-icon-trigger {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        left: 15px !important;
        z-index: 99999 !important;
    }

    .cookie-icon-trigger svg {
        width: 25px !important;
        height: 25px !important;
    }

    .cookie-panel-header h2 {
        font-size: 18px;
    }

    .cookie-preference-panel {
        width: 100%;
        z-index: 99998 !important;
    }
}

@media (max-width: 480px) {
    .cookie-icon-trigger {
        width: 40px !important;
        height: 40px !important;
        bottom: 15px !important;
        left: 10px !important;
    }

    .cookie-icon-trigger svg {
        width: 22px !important;
        height: 22px !important;
    }
}