/* Mourning Mode CSS - โหมดไว้อาลัย */

/* Mourning Ribbon - ริบบิ้นไว้อาลัยมุมขวาบน */
.mourning-ribbon {
    position: fixed;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    z-index: 1050;
    pointer-events: none;
    background-image: url('../../template/black.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
}

.mourning-ribbon span {
    position: absolute;
    top: 18px;
    right: -18px;
    transform: rotate(45deg);
    color: white;
    padding: 5px 28px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    z-index: 1051;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* Mourning Control Panel - แถบควบคุมความจาง */
.mourning-control {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1020 !important;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    pointer-events: auto;
    width: auto;
    max-width: 90%;
}

.mourning-control:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

.mourning-control-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mourning-control-label i {
    font-size: 16px;
}

.mourning-slider {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #e0e0e0 0%, #333 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.mourning-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.mourning-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #000;
}

.mourning-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.mourning-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #000;
}

.mourning-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    min-width: 45px;
    text-align: center;
}

/* Grayscale Filter - ฟิลเตอร์ขาวดำ */
body.mourning-mode {
    transition: filter 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mourning-ribbon {
        width: 100px;
        height: 100px;
    }

    .mourning-ribbon span {
        top: 15px;
        right: -15px;
        padding: 4px 24px;
        font-size: 9px;
    }

    .mourning-control {
        bottom: 10px !important;
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
        border-radius: 20px;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .mourning-slider {
        width: 150px;
    }

    .mourning-control-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mourning-ribbon {
        width: 80px;
        height: 80px;
    }

    .mourning-ribbon span {
        top: 12px;
        right: -12px;
        padding: 3px 20px;
        font-size: 8px;
    }

    .mourning-slider {
        width: 120px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mourning-control {
    animation: fadeIn 0.5s ease;
}

.mourning-ribbon {
    animation: fadeIn 0.5s ease;
}