/**
 * Aufnahmeantrag Stylesheet
 * TC Eisenach e.V.
 */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green-dark:  #1a4d2e;
    --green-mid:   #2d7a4f;
    --green-light: #4caf72;
    --white:       #ffffff;
    --off-white:   #f5f5f0;
    --text-dark:   #1a1a1a;
    --text-muted:  #5a6e5c;
    --border:      #d5e5d8;
    --danger:      #c0392b;
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    background: linear-gradient(to bottom, var(--green-dark), var(--green-mid));
    background-attachment: fixed;
    padding: 2.5rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Tennis court lines background */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, transparent 8%, rgba(255,255,255,.1) 8%, rgba(255,255,255,.1) 8.4%, transparent 8.4%),
        linear-gradient(to right, transparent 91.6%, rgba(255,255,255,.1) 91.6%, rgba(255,255,255,.1) 92%, transparent 92%),
        linear-gradient(to bottom, transparent 20%, rgba(255,255,255,.06) 20%, rgba(255,255,255,.06) 20.4%, transparent 20.4%),
        linear-gradient(to bottom, transparent 79.6%, rgba(255,255,255,.06) 79.6%, rgba(255,255,255,.06) 80%, transparent 80%),
        linear-gradient(to right, transparent 49.8%, rgba(255,255,255,.06) 49.8%, rgba(255,255,255,.06) 50.2%, transparent 50.2%);
    pointer-events: none;
    z-index: 0;
}

.card {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 1.25rem;
    box-shadow: 0 8px 40px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 680px;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-header .logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.page-header .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-header .icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(45,122,79,.3);
}

.page-header .icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.2;
}

.page-header p {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

/* Status icon (success/error pages) */
.status-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.status-icon.check {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 4px 16px rgba(39,174,96,.3);
}

.status-icon.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 16px rgba(231,76,60,.3);
}

.status-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Text styles */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: .5rem;
    text-align: center;
}

.lead {
    font-size: .95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    text-align: center;
}

.info-text {
    font-size: .93rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.error-text {
    font-size: .93rem;
    color: #c0392b;
}

/* Back/home links */
.back-link,
.home-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.back-link:hover,
.home-link:hover {
    color: #fff;
}

.home-link {
    margin-bottom: 0;
    margin-top: 1.5rem;
}

/* Form sections */
.form-section {
    margin-bottom: 1.75rem;
}

.form-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 1rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: .9rem;
}

label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: .3rem;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: .5rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--off-white);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-mid);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,122,79,.12);
}

.form-hint {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* Radio & checkbox */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    margin-top: .3rem;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .25rem;
}

.form-check input[type="radio"],
.form-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: .2rem;
    flex-shrink: 0;
    accent-color: var(--green-mid);
}

.form-check label {
    font-size: .9rem;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0;
}

/* Membership table */
.membership-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.membership-table thead tr {
    background: var(--off-white);
}

.membership-table th {
    text-align: left;
    padding: .5rem .75rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.membership-table th.col-price {
    text-align: right;
}

.membership-table .section-header td {
    padding: .6rem .75rem .3rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--green-mid);
    border-top: 1px solid var(--border);
}

.membership-table td {
    padding: .45rem .75rem;
    vertical-align: middle;
    border-bottom: 1px solid #eef2ef;
}

.membership-table td.price {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-dark);
}

.membership-table tr:last-child td {
    border-bottom: none;
}

/* Footnotes */
.footnotes {
    margin-top: .75rem;
    padding: .75rem;
    background: var(--off-white);
    border-radius: .5rem;
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footnotes p + p {
    margin-top: .4rem;
}

/* Legal box */
.legal-box {
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: .75rem;
    padding: 1.25rem;
    font-size: .85rem;
    line-height: 1.65;
    color: var(--text-dark);
}

.legal-box p + p {
    margin-top: .6rem;
}

.legal-box strong {
    color: var(--green-dark);
}

.text-danger {
    color: var(--danger) !important;
}

/* SEPA box */
.sepa-box {
    background: #eef6f0;
    border: 1.5px solid #b8d9c0;
    border-radius: .75rem;
    padding: 1.25rem;
    font-size: .88rem;
    line-height: 1.6;
}

/* Family member blocks */
.family-member-block {
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
}

.family-member-block h4 {
    font-size: .9rem;
    color: var(--green-dark);
    margin-bottom: .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Alert boxes */
.alert {
    border-radius: .6rem;
    padding: .75rem 1rem;
    font-size: .88rem;
}

.alert-info {
    background: #e8f4fd;
    border: 1.5px solid #b8d9f5;
    color: #1a5276;
}

/* Test mode box */
.test-box {
    background: #fffbe6;
    border: 1.5px solid #f0c040;
    border-radius: .75rem;
    padding: 1.1rem;
    text-align: left;
    font-size: .88rem;
}

.test-label {
    color: #7d6008;
    line-height: 1.5;
}

.email-preview {
    margin-top: .75rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: .5rem;
    padding: .9rem;
    font-size: .83rem;
    line-height: 1.6;
    text-align: left;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .7rem 1.4rem;
    border-radius: .6rem;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
    color: #fff;
    box-shadow: 0 3px 12px rgba(45,122,79,.3);
}

.btn-primary:hover {
    box-shadow: 0 5px 18px rgba(45,122,79,.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
    box-shadow: 0 3px 10px rgba(39,174,96,.25);
}

.btn-success:hover {
    box-shadow: 0 5px 16px rgba(39,174,96,.35);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 3px 10px rgba(231,76,60,.25);
    padding: .4rem .8rem;
    font-size: .85rem;
}

.btn-danger:hover {
    box-shadow: 0 5px 14px rgba(231,76,60,.35);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
    color: #fff;
    box-shadow: 0 3px 10px rgba(45,122,79,.3);
}

.btn-confirm:hover {
    box-shadow: 0 5px 16px rgba(45,122,79,.4);
}

/* Divider */
hr.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .card {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .page-header h1,
    h1 {
        font-size: 1.2rem;
    }

    .page-header {
        flex-direction: column;
        text-align: center;
    }
}
