/**
 * ReCensioX.com - Main Stylesheet
 *
 * @version 1.0.0-mvp
 */

/* ===========================
   CSS Variables & Reset
   =========================== */

:root {
    /* Default colors (overridden by inline styles from company branding) */
    --primary-color: #00b67a;
    --secondary-color: #005128;
    --star-color: #ffd700;
    --star-empty: #dcdce6;
    --text-dark: #191919;
    --text-medium: #666666;
    --text-light: #999999;
    --border-color: #e6e6e6;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --error-color: #f44336;
    --success-color: #00b67a;
    --warning-color: #ff9800;
    --info-color: #2196f3;
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Container & Layout
   =========================== */

.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (max-width: 640px) {
    .container {
        margin: 1rem auto;
    }
}

/* ===========================
   Card Components
   =========================== */

.review-form-card,
.thankyou-card,
.error-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
    .review-form-card,
    .thankyou-card,
    .error-card {
        padding: 1.5rem;
        border-radius: 4px;
    }
}

/* ===========================
   Company Logo
   =========================== */

.company-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.company-logo img {
    max-width: 200px;
    max-height: 80px;
    height: auto;
}

@media (max-width: 640px) {
    .company-logo img {
        max-width: 150px;
        max-height: 60px;
    }
}

/* ===========================
   Typography
   =========================== */

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.3;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }
}

/* ===========================
   Star Rating
   =========================== */

.star-rating {
    margin-bottom: 2rem;
}

.rating-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars input[type="radio"] {
    display: none;
}

.stars label {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.stars label:hover {
    transform: scale(1.15);
}

.star-icon {
    width: 48px;
    height: 48px;
    fill: var(--star-empty);
    transition: fill 0.2s ease;
}

@media (max-width: 640px) {
    .star-icon {
        width: 40px;
        height: 40px;
    }
}

/* Star rating states - filled on hover and selection */
.stars input[type="radio"]:checked ~ label .star-icon,
.stars input[type="radio"]:checked ~ label ~ label .star-icon {
    fill: var(--star-color);
}

.stars label:hover .star-icon,
.stars label:hover ~ label .star-icon {
    fill: var(--star-color);
}

.rating-text {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-color);
    min-height: 1.5rem;
}

/* ===========================
   Form Elements
   =========================== */

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

label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.required {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* ===========================
   Buttons
   =========================== */

.btn-submit,
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-submit,
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-submit:hover,
.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 182, 122, 0.25);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* ===========================
   Order Info & Messages
   =========================== */

.order-info {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.order-ref {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin: 1rem 0;
}

.message-box {
    margin: 1.5rem 0;
}

.main-message {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}

.sub-message {
    font-size: 1rem;
    color: var(--text-medium);
    text-align: center;
    line-height: 1.6;
}

/* ===========================
   Privacy Notice
   =========================== */

.privacy-notice {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.privacy-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.privacy-notice a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* ===========================
   Error Messages
   =========================== */

.error-box {
    background: #fff5f5;
    border: 1px solid var(--error-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.error-box strong {
    color: var(--error-color);
    display: block;
    margin-bottom: 0.5rem;
}

.error-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-box li {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

/* ===========================
   Error Page
   =========================== */

.error-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.error-icon i {
    font-size: 4rem;
    line-height: 1;
}

.error-message {
    text-align: center;
    margin: 1.5rem 0;
}

.main-error {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
}

.suggestion {
    font-size: 1rem;
    color: var(--text-medium);
    margin-top: 0.75rem;
}

.help-section {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.help-section h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.help-section p {
    text-align: center;
    margin-bottom: 0.75rem;
}

.help-section ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.help-section li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

.help-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}

/* ===========================
   Thank You Page
   =========================== */

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.4s ease-out;
}

.checkmark {
    color: var(--white);
    font-size: 3rem;
    font-weight: bold;
    animation: checkmarkPop 0.5s ease-out 0.2s both;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.rating-emoji {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--star-color);
}

.follow-up-box {
    background: #fff9e6;
    border: 1px solid var(--warning-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.follow-up-box p {
    margin-bottom: 0.75rem;
}

.follow-up-box a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.follow-up-box a:hover {
    text-decoration: underline;
}

.footer-note {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-note small {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ===========================
   Utility Classes
   =========================== */

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}
