/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. CSS Variables & Theme
   2. Reset & Base Styles
   3. Layout & Container
   4. Typography & Header
   5. Form Groups & Standard Inputs
   6. Custom Mobile Radio Cards (The core Mobile UX)
   7. Buttons & Highlights
   8. Footer & GDPR
   ========================================================================== */

/* --- 1. CSS Variables & Theme --- */
:root {
    --primary-color: #0d6efd; /* Medical Blue */
    --primary-hover: #0b5ed7;
    --primary-light: #e7f1ff;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --border-radius: 12px;
    --transition: all 0.2s ease-in-out;
}

/* --- 2. Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- 3. Layout & Container --- */
/* Περιορίζουμε το πλάτος για να φαίνεται σαν app ακόμα και σε desktop */
.app-container {
    max-width: 480px; 
    margin: 0 auto;
    background-color: var(--card-bg);
    min-height: 100vh;
    padding: 30px 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* --- 4. Typography & Header --- */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 15px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.app-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- 5. Form Groups & Standard Inputs --- */
.form-group {
    margin-bottom: 25px;
}

.question-title {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Custom Select Dropdown */
.select-wrapper select,
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    appearance: none; /* Αφαιρεί το default βελάκι σε iOS/Android */
    outline: none;
    transition: var(--transition);
}

.select-wrapper select:focus,
input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Προσθήκη custom βέλους στο select */
.select-wrapper {
    position: relative;
}
.select-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* --- 6. Custom Mobile Radio & Checkbox Cards --- */
.radio-card input[type="radio"],
.check-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-card,
.check-card {
    display: block;
    cursor: pointer;
}

.card-content {
    display: block;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Η κατάσταση όταν ο χρήστης επιλέγει την κάρτα (λειτουργεί και σε radio και σε checkbox) */
.radio-card input[type="radio"]:checked + .card-content,
.check-card input[type="checkbox"]:checked + .card-content {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* --- 7. Buttons & Highlights --- */
.highlight-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 15px;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:active {
    transform: scale(0.98);
    background-color: var(--primary-hover);
}

/* --- 8. Footer & GDPR --- */
.gdpr-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* --- 9. Dynamic Hidden Inputs --- */
.hidden-input-wrapper {
    display: none; /* Κρυμμένο by default, το ελέγχει η JS */
    margin-top: 12px;
    animation: slideDown 0.3s ease-out forwards;
}

.hidden-input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    border: 1px solid var(--primary-color); /* Έντονο border για να τραβάει την προσοχή */
    border-radius: var(--border-radius);
    outline: none;
    transition: var(--transition);
}

.hidden-input-wrapper input:focus {
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Ομαλή εμφάνιση προς τα κάτω */
@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ==========================================================================
   10. Success / Thank You Page Styles
   ========================================================================== */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 50px;
}

.success-message h1 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 40px;
}

/* Google Review Box */
.google-review-box {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.google-review-box h3 {
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.google-review-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background-color: #4285F4; /* Google Blue */
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.google-btn:hover {
    background-color: #3367D6;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

/* Animated Checkmark */
.success-icon-wrapper {
    margin-bottom: 25px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #28a745; /* Success Green */
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}