/**
 * Rating Prompt Styles
 *
 * Non-blocking slide-in banner for collecting user ratings/testimonials.
 *
 * @author Claude Code
 * @date 2025-01-19
 */

.rating-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001; /* Above .top header */
    padding: 0 16px 16px;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-prompt--visible {
    transform: translateY(0);
}

.rating-prompt__content {
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    padding: 24px;
    pointer-events: auto;
    position: relative;
}

.rating-prompt__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.rating-prompt__close:hover {
    background: #f1f5f9;
    color: #334155;
}

.rating-prompt__header {
    text-align: center;
    margin-bottom: 20px;
}

.rating-prompt__title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.rating-prompt__subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.rating-prompt__stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-prompt__star {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #cbd5e1;
    transition: transform 0.2s, color 0.2s;
}

.rating-prompt__star:hover {
    transform: scale(1.15);
}

.rating-prompt__star--filled {
    color: #f59e0b;
}

.rating-prompt__star svg {
    display: block;
}

.rating-prompt__comment-section {
    margin-bottom: 16px;
    animation: ratingFadeIn 0.3s ease;
}

@keyframes ratingFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-prompt__textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    color: #1e293b;
    box-sizing: border-box;
}

.rating-prompt__textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.rating-prompt__char-count {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.rating-prompt__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rating-prompt__checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.rating-prompt__checkbox {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.rating-prompt__submit {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.rating-prompt__submit:hover:not(:disabled) {
    background: #2563eb;
}

.rating-prompt__submit:active:not(:disabled) {
    transform: scale(0.98);
}

.rating-prompt__submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Thank you state */
.rating-prompt__thank-you {
    text-align: center;
    padding: 20px 0;
}

.rating-prompt__check {
    color: #22c55e;
    margin-bottom: 12px;
    animation: ratingScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ratingScaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.rating-prompt__thank-you p {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .rating-prompt {
        padding: 0;
    }

    .rating-prompt__content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 20px 16px;
    }

    .rating-prompt__actions {
        flex-direction: column;
        gap: 12px;
    }

    .rating-prompt__checkbox-label {
        order: 2;
    }

    .rating-prompt__submit {
        width: 100%;
        order: 1;
    }
}

/* ==========================================================================
   Dark Mode Styles
   ========================================================================== */

.dark-mode .rating-prompt__content {
    background: #1e293b;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.dark-mode .rating-prompt__close {
    color: #94a3b8;
}

.dark-mode .rating-prompt__close:hover {
    background: #334155;
    color: #e2e8f0;
}

.dark-mode .rating-prompt__title {
    color: #f1f5f9;
}

.dark-mode .rating-prompt__subtitle {
    color: #94a3b8;
}

.dark-mode .rating-prompt__star {
    color: #475569;
}

.dark-mode .rating-prompt__star--filled {
    color: #f59e0b;
}

.dark-mode .rating-prompt__textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-mode .rating-prompt__textarea::placeholder {
    color: #64748b;
}

.dark-mode .rating-prompt__textarea:focus {
    border-color: #3b82f6;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.dark-mode .rating-prompt__char-count {
    color: #64748b;
}

.dark-mode .rating-prompt__checkbox-label {
    color: #94a3b8;
}

.dark-mode .rating-prompt__submit:disabled {
    background: #475569;
    color: #94a3b8;
}

.dark-mode .rating-prompt__thank-you p {
    color: #f1f5f9;
}
