/* ===================
   Shared Feedback Form Styles (Mobile First)
   =================== */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

/* ===================
   Base / Reset
   =================== */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Quicksand", sans-serif;
}

/* ===================
   Mobile First (Default)
   =================== */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: white;
    margin: 0;
    padding: 0;
}

.page-container {
    height: 100vh;
    overflow: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header img {
    width: 60px;
    margin-bottom: 0.75rem;
}

.page-header h1 {
    color: #333;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: #666;
    font-size: 0.9rem;
}

.back-link {
    display: inline-block;
    /* margin-bottom: 1rem; */
    color: #00B2F5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Visually hidden (screen reader only) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Feedback Form */
.feedback-form {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 4px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group textarea,
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00B2F5;
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.25rem;
    font-size: 3.5rem;
    cursor: pointer;
    justify-content: center;
}

.star {
    color: #ddd;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.star:hover {
    transform: scale(1.1);
}

.star.active {
    color: #ffc107;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: #00B2F5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background-color: #0099d4;
}

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

.submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Accessible focus outlines for interactive elements */
.submit-btn:focus-visible,
.back-link:focus-visible {
    outline: 3px solid #111;
    outline-offset: 2px;
}

/* Button Spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

.submit-btn.submitting .btn-spinner {
    display: inline-block;
}

.submit-btn.submitting {
    background-color: #999;
    cursor: wait;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Success State - Add Another */
.submit-btn.success {
    background-color: #28a745;
}

.submit-btn.success:hover {
    background-color: #218838;
}

/* Form Messages */
.form-message {
    display: none;
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================
   Tablet (min-width: 600px)
   =================== */
@media (min-width: 600px) {

    .page-container {
        max-width: 500px;
        margin: 0 auto;
    }

    .page-header {
        margin-bottom: 2rem;
    }

    .page-header img {
        width: 70px;
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .back-link {
        /* margin-bottom: 1.5rem; */
        font-size: 1rem;
    }

    .feedback-form {
        padding: 1.75rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .star-rating {
        gap: 0.5rem;
        font-size: 2.25rem;
    }

    .submit-btn {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .form-message {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ===================
   Desktop (min-width: 900px)
   =================== */
@media (min-width: 900px) {

    .page-container {
        max-width: 600px;
    }

    .page-header img {
        width: 80px;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .form-wrap {
        width: 100%;
    }

    .feedback-form {
        padding: 2rem;
        width: 100%;
        max-width: 1000px;
        margin: 0 auto;
    }

    .star-rating {
        font-size: 2.5rem;
    }
}
