
.survey-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    margin: 50px auto;
    text-align: center;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.survey-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.survey-question {
    font-size: 14px;
    margin-bottom: 15px;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    direction: rtl;
}

.star {
    display: none;
}

.star + label {
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

.star:hover + label,
.star:hover + label ~ label {
    color: #459892;
}

.star:checked + label,
.star:checked + label ~ label {
    color: #459892;
}

.feedback-container {
    margin-bottom: 20px;
    display: none; /* 預設隱藏 */
}

.feedback-container.show {
    display: block; /* 當星星 <= 2 時顯示 */
}

textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

textarea::placeholder {
    color: #999;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.submit-btn {
    background-color: #ffcc33;
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.submit-btn:hover {
    background-color: #ffa933;
}

/* Modal 樣式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-content .close-btn {
    position: absolute;
    top: -4px;
    right: 8px;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    border: none;
    background: none;
}

.modal-content .close-btn:hover {
    color: #333;
}

.modal-content .icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.modal-content .error-icon {
    color: #dc3545;
}

.modal-content .success-icon {
    color: #28a745;
}

.modal-content p {
    margin: 0 0 15px;
    font-size: 16px;
}

.modal.show {
    display: flex;
}

@media (max-width: 456px) {
    .survey-container {
        width: 90%;
        margin: 20px auto;
        padding: 15px;
    }

    .survey-title {
        font-size: 16px;
    }

    .survey-question {
        font-size: 12px;
    }

    .star + label {
        font-size: 20px;
    }

    .submit-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .modal-content {
        width: 80%;
    }

    .modal-content .close-btn {
        font-size: 28px;
    }

    textarea {
        font-size: 12px;
        height: 60px;
    }

    .error-message {
        font-size: 10px;
    }
}
