/* Premium, modern styling for the Event Registration Form */
.er-form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); /* Soft, premium shadow */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

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

.er-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
}

.er-form-group input,
.er-form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: #2d3748;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.er-form-group input:focus,
.er-form-group select:focus {
    outline: none;
    border-color: #4299e1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

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

.er-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.er-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
}

.er-btn:active {
    transform: translateY(0);
}

.er-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.er-success {
    background-color: #DEF7EC;
    color: #03543F;
    border: 1px solid #31C48D;
}

.er-error {
    background-color: #FDE8E8;
    color: #9B1C1C;
    border: 1px solid #F98080;
}

/* Waypoints Table Responsiveness */
.er-waypoints-table {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.er-waypoints-table th {
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.er-waypoints-table tr:hover {
    background-color: #f1f5f9;
}

@media screen and (max-width: 600px) {
    .er-waypoints-table {
        border: 0;
        box-shadow: none;
    }
    .er-waypoints-table thead {
        display: none;
    }
    .er-waypoints-table tr {
        display: block;
        margin-bottom: 1.5rem;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        padding: 0.5rem;
    }
    .er-waypoints-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.95rem;
        border-bottom: 1px solid #f1f5f9;
        padding: 0.75rem 1rem !important;
        position: relative;
    }
    .er-waypoints-table td:last-child {
        border-bottom: 0;
    }
    .er-waypoints-table td:before {
        content: attr(data-label);
        flex-shrink: 0;
        margin-right: 1rem;
        font-weight: 700;
        color: #718096;
        font-size: 0.85rem;
        text-transform: uppercase;
    }
    /* Highlight the Waypoint Location */
    .er-waypoints-table td[data-label="Waypoint"] {
        display: block;
        text-align: left;
        font-size: 1.1rem;
        font-weight: 800;
        color: #2d3748;
        background: #f8fafc;
        border-radius: 8px 8px 0 0;
        padding-top: 1rem !important;
    }
    .er-waypoints-table td[data-label="Waypoint"]:before {
        display: none;
    }

    /* START / PAUSE rows in standard mobile layout: hide empty stat cells */
    .er-waypoints-table tr.er-wp-minimal td[data-label="Distance"],
    .er-waypoints-table tr.er-wp-minimal td[data-label="Elevation"],
    .er-waypoints-table tr.er-wp-minimal td[data-label="Duration"] {
        display: none;
    }
    /* Show Arrival for minimal rows with a clean inline label */
    .er-waypoints-table tr.er-wp-minimal td[data-label="Arrival"] {
        text-align: left;
        font-size: 0.9rem;
        color: #718096;
        font-weight: 600;
        border-bottom: 0;
    }
    .er-waypoints-table tr.er-wp-minimal td[data-label="Arrival"]:before {
        font-size: 0.75rem;
        color: #a0aec0;
    }
    /* Hide Note cell for minimal rows if it is empty */
    .er-waypoints-table tr.er-wp-minimal td[data-label="Note"]:empty {
        display: none;
    }
}

/* 2-Line Mobile Layout Variation */
@media screen and (max-width: 600px) {
    .er-waypoints-2line tr {
        padding: 0.75rem;
    }
    .er-waypoints-2line td {
        display: none; /* Hide all by default */
        border: 0;
        padding: 0.25rem 0.5rem !important;
    }
    .er-waypoints-2line td[data-label="Waypoint"] {
        display: block;
        font-size: 1.05rem;
        background: transparent;
        padding-bottom: 0 !important;
    }
    .er-waypoints-2line td[data-label="Distance"] {
        display: block;
        text-align: left;
        font-size: 0.85rem;
        color: #718096;
        padding-top: 0 !important;
    }
    .er-waypoints-2line td[data-label="Distance"]:before {
        display: none;
    }
    /* Show the combined string in the Distance cell */
    .er-waypoints-2line td[data-label="Distance"]:after {
        content: attr(data-combined);
        display: block;
    }
    /* Show the Note as a 3rd line */
    .er-waypoints-2line td[data-label="Note"] {
        display: block;
        text-align: left;
        font-size: 0.9rem;
        background: #fff;
        border-top: 1px dotted #e2e8f0;
        padding-top: 0.5rem !important;
    }
    .er-waypoints-2line td[data-label="Note"]:before {
        content: "Note";
        display: inline-block;
        margin-right: 10px;
        font-weight: 700;
        color: #718096;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    /* Hide the original value of Distance cell */
    .er-waypoints-2line td[data-label="Distance"] {
        visibility: hidden;
        height: 1.2rem;
    }
    .er-waypoints-2line td[data-label="Distance"]:after {
        visibility: visible;
        margin-top: -1.2rem;
        font-weight: 600;
        color: #2d3748;
    }

    /* START / PAUSE rows: show only Waypoint, Arrival, Note (max 3 lines) */
    .er-waypoints-2line tr.er-wp-minimal td[data-label="Distance"] {
        display: none !important; /* Hide the combined stats line */
    }
    .er-waypoints-2line tr.er-wp-minimal td[data-label="Arrival"] {
        display: block !important;
        text-align: left;
        font-size: 0.9rem;
        color: #718096;
        font-weight: 600;
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
        border-bottom: 0;
    }
    .er-waypoints-2line tr.er-wp-minimal td[data-label="Arrival"]:before {
        content: attr(data-label);
        display: inline-block;
        margin-right: 8px;
        font-weight: 700;
        color: #a0aec0;
        font-size: 0.75rem;
        text-transform: uppercase;
    }
}

/* === v1.4.0: Klassen für vormals inline-gestylte Elemente === */

.er-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
}

.er-form .er-select-disabled {
    background-color: #edf2f7;
    cursor: not-allowed;
    opacity: 0.8;
}

.er-form .er-checkbox-row {
    display: flex;
    align-items: flex-start;
}
.er-form .er-checkbox-row input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 3px;
}
.er-form .er-checkbox-row label {
    font-weight: normal;
}
.er-form textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-family: inherit;
}

.er-btn.er-btn-danger {
    background: #e53e3e;
}

.er-message.er-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.er-participant-list h3 {
    margin-top: 0;
    color: #2d3748;
    margin-bottom: 1rem;
}
.er-participant-list .er-participants {
    list-style: none;
    padding: 0;
    margin: 0;
}
.er-participant-list .er-participants li {
    padding: 1rem 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.er-participant-list .er-participant-name {
    color: #4a5568;
    font-size: 1.05rem;
}
.er-participant-list .er-participant-location {
    font-size: 0.85rem;
    color: #4299e1;
    background: #ebf8ff;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.er-signup-heading {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.er-events-master-list h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}
.er-events-master-list ul.er-events {
    list-style: none;
    padding: 0;
    margin: 0;
}
.er-events-master-list ul.er-events li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf2f7;
}
.er-events-master-list .er-event-link {
    text-decoration: none;
    color: #3182ce;
    font-size: 1.2rem;
    font-weight: bold;
}
.er-events-master-list .er-event-link.er-event-done {
    color: #38a169;
}
.er-events-master-list .er-event-meta {
    color: #718096;
    font-size: 0.9em;
}
.er-back-wrap { margin-bottom: 2rem; }
.er-back-link {
    display: inline-block;
    padding: 8px 16px;
    background: #edf2f7;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.er-waypoints-table th,
.er-waypoints-table td {
    padding: 10px;
    text-align: left;
}
.er-waypoints-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.er-waypoints-table thead tr {
    background: #f7fafc;
    border-bottom: 2px solid #edf2f7;
    font-weight: bold;
}
.er-waypoints-table tbody tr {
    border-bottom: 1px solid #edf2f7;
}
