/* Chat Customization Shop Modal */

#chat-customization-modal .chat-custom-modal-content {
    max-width: 520px;
    width: calc(100% - 24px);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(22, 22, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    margin: 4vh auto;
}

#chat-customization-modal .chat-custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(32, 32, 36, 0.95);
    flex-shrink: 0;
}

#chat-customization-modal .chat-custom-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-customization-modal .chat-custom-modal-header h3 i {
    color: #f59e0b;
}

#chat-customization-modal .chat-custom-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

#chat-customization-modal .chat-custom-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

#chat-customization-modal .chat-custom-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.chat-custom-loading,
.chat-custom-error {
    text-align: center;
    padding: 40px 16px;
    color: rgba(255, 255, 255, 0.7);
}

.chat-custom-error {
    color: #f87171;
}

.chat-custom-section {
    background: rgba(38, 38, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.chat-custom-section:last-child {
    margin-bottom: 0;
}

.chat-custom-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.chat-custom-section-title i {
    color: #f59e0b;
    font-size: 13px;
}

.chat-custom-color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.chat-custom-color-swatch {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-custom-color-swatch:not(.locked):hover {
    transform: scale(1.08);
}

.chat-custom-color-swatch.active {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
    transform: scale(1.05);
}

.chat-custom-color-swatch.locked {
    cursor: pointer;
    opacity: 0.75;
}

.chat-custom-color-swatch.locked i {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.chat-custom-color-swatch .swatch-check {
    position: absolute;
    top: 3px;
    right: 3px;
    color: #f59e0b;
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.chat-custom-color-label {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
}

.chat-custom-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin: 10px 0 0;
}

.chat-custom-premium {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(30, 58, 138, 0.2));
    border-color: rgba(167, 139, 250, 0.25);
}

.chat-custom-premium.golden {
    background: linear-gradient(135deg, rgba(180, 130, 0, 0.2), rgba(120, 80, 0, 0.15));
    border-color: rgba(245, 158, 11, 0.3);
}

.chat-custom-premium-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 0 0 12px;
}

.chat-custom-progress {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-custom-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.chat-custom-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #a855f7);
    border-radius: 3px;
    transition: width 0.3s;
}

.chat-custom-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-custom-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.chat-custom-btn:active {
    transform: scale(0.98);
}

.chat-custom-btn.rainbow {
    background: linear-gradient(90deg, #ff0080, #ff8000, #ffff00, #00ff80, #0080ff, #8000ff);
    background-size: 200% 100%;
    animation: chatCustomRainbow 4s linear infinite;
    border: none;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.chat-custom-btn.golden {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    color: #1a1a1a;
}

.chat-custom-btn.active-state {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.chat-custom-btn-row {
    display: flex;
    gap: 8px;
}

.chat-custom-btn-row .chat-custom-btn {
    flex: 1;
}

.chat-custom-btn-row .chat-custom-btn-off {
    flex: 0 0 auto;
    width: 44px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.chat-custom-locked-msg {
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

@keyframes chatCustomRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@media (min-width: 600px) {
    #chat-customization-modal .chat-custom-modal-content {
        max-width: 640px;
    }

    .chat-custom-sections-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .chat-custom-sections-grid .chat-custom-section {
        margin-bottom: 0;
    }
}
