* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
}

.feedback-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.feedback-page__container {
    width: 100%;
    max-width: 600px;
}

/* Form Container */
.form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 32px;
    position: relative;
}

.form-container__wrapper {
    display: flex;
    flex-direction: column;
}

/* Heading */
.form-text--heading {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

/* Close Button - Hidden on standalone page */
.form-button--close {
    display: none;
}

/* Form Fields */
.form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-field {
    width: 100%;
}

.form-field--margin {
    margin-top: 8px;
}

/* Labels */
.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-field[error="true"] {
    border-color: #dc3545;
}

/* Textarea */
.input-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-textarea[error="true"] {
    border-color: #dc3545;
}

/* Star Rating */
.score-select {
    text-align: center;
    margin-bottom: 16px;
}

.form-text--rate {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.score-select-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.score-select-star {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.score-select-star:hover {
    transform: scale(1.15);
}

/* Upload Section */
.upload-wrapper {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.upload-wrapper:hover {
    border-color: #007bff;
}

.file-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.file-overlay[uploaded="true"] {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.upload-button {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-button input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-button img {
    width: 32px;
    height: 32px;
}

.file-overlay-text {
    font-size: 14px;
    color: #666;
}

.input-span {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Thumbnail */
.thumb-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.upload-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/* Radio Buttons */
.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.rating label {
    cursor: pointer;
    margin-bottom: 0;
}

/* Error Message */
.form-error {
    display: none;
    width: 100%;
    padding: 12px;
    background-color: #fff0f0;
    border: 1px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    font-size: 14px;
    margin-top: 16px;
}

.form-error--active {
    display: block;
}

/* Submit Button */
.cta {
    width: 100%;
    max-width: 300px;
    padding: 14px 32px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 24px auto 0;
    transition: background-color 0.2s ease;
    position: relative;
}

.cta:hover {
    background-color: #0056b3;
}

.cta[loading="true"] .submit__text {
    display: none;
}

.cta[loading="true"] .processing {
    display: inline;
}

.cta[loading="true"] .cta__loading {
    display: inline-block;
}

.processing {
    display: none;
}

.cta__loading {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

.submit__icon--wrapper {
    display: none;
}

/* Thank You Message */
.thank-you {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
}

.thank-you--active {
    display: flex;
}

.thank-you svg {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.thank-you__text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .form-container {
        padding: 24px 16px;
    }

    .form-text--heading {
        font-size: 20px;
    }

    .score-select-star {
        width: 32px;
        height: 32px;
    }
}
