/* ==========================================================================
   FORMS CSS - Κεντρικό στυλ για όλες τις φόρμες (Modals/Iframes)
   ========================================================================== */

/* Βασικές ρυθμίσεις για το σώμα της σελίδας μέσα στο iframe */
body.form-page {
    margin: 0;
    padding: 0;
    background: transparent !important; /* Για να φαίνεται το blur του overlay */
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Overlay φόντο */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Το λευκό κουτί της φόρμας */
.modal-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-height: 95vh;
    overflow-y: auto;
}

/* Κουμπί κλεισίματος */
.close-btn {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #ccc;
    border: none;
    background: none;
    transition: 0.2s;
}
.close-btn:hover { color: #666; }

/* Τίτλοι και κείμενο */
.modal-box h2 { color: #1e293b; margin: 0 0 5px 0; text-align: center; font-weight: 700; }
.modal-box p { color: #64748b; text-align: center; font-size: 14px; margin-bottom: 25px; }

/* Layout Φόρμας (Grid) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.full-width { grid-column: span 2; }

/* Input Wrappers & Icons */
.input-wrapper { position: relative; width: 100%; }
.input-wrapper i {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

/* Στυλ για Inputs, Selects, Textareas */
input, select, textarea {
    width: 100%;
    height: 48px;
    padding: 0 15px 0 45px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    background: #f8fafc;
    color: #64748b;
    box-sizing: border-box;
    transition: all 0.2s;
    font-family: inherit;
}

::placeholder { color: #94a3b8; opacity: 1; }
select { appearance: none; cursor: pointer; }

/* Βέλος στα Dropdowns */
.input-wrapper.select-type::after {
    content: "\F285";
    font-family: "bootstrap-icons";
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}

textarea { height: auto; padding-top: 12px; min-height: 70px; }

/* Focus effects */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #00A81A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 168, 26, 0.1);
    color: #475569;
}

/* Κουμπί υποβολής */
.submit-btn {
    background: #00A81A;
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
}
.submit-btn:hover { background: #008f16; }

/* Δυναμικά πεδία (Dependents) */
.dependent-item {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    margin-top: 5px;
}
.dependent-item label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 5px;
    display: block;
    font-weight: 600;
}

/* Responsive για μικρές οθόνες */
@media (max-width: 520px) {
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .modal-box { padding: 20px; }
}