/**
 * HDF Camp Warteliste – Frontend Styles
 */

/* Waitlist notice banner on product page */
.hdf-warteliste-notice {
    background: rgba(219, 8, 64, 0.05);
    border: 2px solid #DB0840;
    border-radius: 8px;
    padding: 22px 25px;
    margin: 45px 0 25px -6px;
    box-shadow: 0 2px 12px rgba(11, 32, 60, 0.08);
}

.hdf-warteliste-notice-inner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.hdf-warteliste-icon {
    flex-shrink: 0;
    color: #DB0840;
    line-height: 0;
}

.hdf-warteliste-notice-text strong {
    display: block;
    font-size: 18px;
    color: #DB0840;
    margin-bottom: 5px;
}

.hdf-warteliste-notice-text p {
    margin: 0;
    color: #0b203c;
    font-size: 14px;
    line-height: 1.5;
}

/* Login/Register link in notice */
.hdf-warteliste-login-link {
    color: #DB0840 !important;
    font-weight: 700;
    text-decoration: underline !important;
    cursor: pointer;
}

.hdf-warteliste-login-link:hover {
    color: #b80635 !important;
}

/* "Mein Kind auf die Warteliste setzen" reveal button */
.hdf-warteliste-reveal-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 16px 24px;
    background-color: #DB0840;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.hdf-warteliste-reveal-btn:hover {
    background-color: #b80635;
}

.hdf-warteliste-reveal-btn:active {
    transform: scale(0.98);
}

.hdf-warteliste-reveal-btn:focus {
    outline: 2px solid #DB0840;
    outline-offset: 2px;
}

/* Hide the add-to-cart form initially when logged in (body class set by PHP) */
body.hdf-waitlist-form-collapsed form.cart {
    display: none !important;
}

/* Waitlist full notice */
.hdf-warteliste-full {
    background: #fff;
    border-color: #0b203c;
}

.hdf-warteliste-full p {
    color: #0b203c !important;
}

.hdf-warteliste-full strong {
    color: #0b203c !important;
}

/* Success message after registration */
.hdf-warteliste-success {
    background: #fff;
    border: 2px solid #0b203c;
    border-radius: 8px;
    padding: 30px 25px;
    margin: 40px 0 25px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(11, 32, 60, 0.08);
}

.hdf-warteliste-success .hdf-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0b203c;
    color: #fff;
    font-size: 22px;
    margin-bottom: 12px;
}

.hdf-warteliste-success p {
    color: #0b203c;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.hdf-warteliste-success p strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.hdf-warteliste-success a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 28px;
    background: #DB0840;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.hdf-warteliste-success a:hover {
    background: #b80635;
}

/* Override button styling for waitlist submit button */
.single-product .single_add_to_cart_button.hdf-waitlist-button {
    background-color: #DB0840 !important;
    border-color: #DB0840 !important;
    color: #fff !important;
}

.single-product .single_add_to_cart_button.hdf-waitlist-button:hover {
    background-color: #b80635 !important;
    border-color: #b80635 !important;
}

/* Loading state */
.single-product .single_add_to_cart_button.hdf-waitlist-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Billing fields section */
.hdf-billing-fields {
    margin: 20px 0 15px;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.hdf-billing-fields-title {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 700;
    color: #0b203c;
}

.hdf-billing-fields-desc {
    margin: 0 0 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.hdf-billing-fields .form-row {
    margin-bottom: 14px;
    padding: 0;
}

.hdf-billing-fields .form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #0b203c;
}

.hdf-billing-fields .form-row .input-text,
.hdf-billing-fields .form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.hdf-billing-fields .form-row .input-text:focus,
.hdf-billing-fields .form-row select:focus {
    border-color: #0b203c;
    outline: none;
    box-shadow: 0 0 0 1px rgba(11, 32, 60, 0.2);
}

.hdf-billing-fields .form-row-first,
.hdf-billing-fields .form-row-last {
    display: inline-block;
    width: 48%;
    vertical-align: top;
}

.hdf-billing-fields .form-row-first {
    margin-right: 3%;
}

.hdf-billing-fields .form-row abbr.required {
    color: #DB0840;
    text-decoration: none;
    font-weight: 700;
}

/* Error state for billing fields */
.hdf-billing-fields .hdf-field-error {
    border-color: #DB0840 !important;
    box-shadow: 0 0 0 1px rgba(219, 8, 64, 0.3) !important;
}

/* =====================================================
   My Account – Warteliste (Untitled UI Table Style)
   ===================================================== */

/* Empty state */
.hdf-wl-empty {
    text-align: center;
    padding: 60px 20px;
}

.hdf-wl-empty-icon {
    color: #d0d5dd;
    margin-bottom: 16px;
}

.hdf-wl-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 4px;
}

.hdf-wl-empty-text {
    font-size: 14px;
    color: #667085;
    margin: 0;
}

/* Container – thin border, subtle shadow like Untitled UI */
.hdf-wl-account {
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* Header row – no visible background, just bottom border */
.hdf-wl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
}

.hdf-wl-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hdf-wl-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
    line-height: 1.3;
}

.hdf-wl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    line-height: 1.5;
}

/* Table wrapper */
.hdf-wl-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table base */
.hdf-wl-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

/* Table header – matches Untitled UI exactly */
.hdf-wl-table thead th {
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 500;
    color: #667085;
    text-align: left;
    background: #f9fafb;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    white-space: nowrap;
}

/* Table rows – generous height like the reference */
.hdf-wl-table tbody td {
    padding: 24px 24px;
    font-size: 14px;
    color: #101828;
    border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
    line-height: 1.4;
}

.hdf-wl-table tbody tr:last-child td {
    border-bottom: none;
}

/* Camp link – bold, dark, red on hover */
.hdf-wl-camp-link {
    color: #101828;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hdf-wl-camp-link:hover {
    color: #DB0840;
    text-decoration: underline;
}

/* Child name */
.hdf-wl-td-child {
    color: #667085;
    font-weight: 400;
}

/* Muted placeholder */
.hdf-wl-muted {
    color: #d0d5dd;
}

/* Date column – secondary color */
.hdf-wl-td-date {
    color: #667085;
    white-space: nowrap;
}

/* Status badge – pill with border, like Untitled UI "Active" badge */
.hdf-wl-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px 2px 8px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid;
}

.hdf-wl-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hdf-wl-status--waiting {
    background: #f8f9fc;
    color: #363f72;
    border-color: #d5d9eb;
}

.hdf-wl-status--waiting .hdf-wl-status-dot {
    background: #6172f3;
}

/* Cancel button – subtle, text-style with icon feel */
.hdf-wl-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #667085 !important;
    background: transparent;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.3;
}

.hdf-wl-cancel-btn:hover {
    background: #fef3f2;
    border-color: #fda29b;
    color: #b42318 !important;
}

/* Actions column right-aligned */
.hdf-wl-th-actions,
.hdf-wl-td-actions {
    text-align: right;
}

/* Edit form */
.woocommerce-MyAccount-content .hdf-warteliste-edit-form {
    max-width: 600px;
}

.hdf-warteliste-wapf-info {
    margin: 20px 0;
}

.hdf-warteliste-wapf-info h4 {
    margin-top: 0;
}

/* Responsive: card-style on mobile */
@media (max-width: 640px) {
    .hdf-wl-table thead {
        display: none;
    }

    .hdf-wl-table tbody tr {
        display: block;
        padding: 20px;
        border-bottom: 1px solid #eaecf0;
    }

    .hdf-wl-table tbody tr:last-child {
        border-bottom: none;
    }

    .hdf-wl-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: none;
        font-size: 14px;
    }

    .hdf-wl-table tbody td::before {
        content: attr(data-title);
        font-size: 12px;
        font-weight: 500;
        color: #667085;
        flex-shrink: 0;
        margin-right: 16px;
    }

    .hdf-wl-td-camp {
        padding-bottom: 6px !important;
        font-size: 15px;
    }

    .hdf-wl-td-camp::before {
        display: none;
    }

    .hdf-wl-td-actions {
        text-align: left;
        padding-top: 12px !important;
    }

    .hdf-wl-td-actions::before {
        display: none;
    }

    .hdf-wl-cancel-btn {
        width: 100%;
        justify-content: center;
    }

    .hdf-wl-header {
        padding: 16px 20px 12px;
    }
}

/* =====================================================
   My Account – Meine Anmeldungen (Untitled UI Style)
   ===================================================== */

/* Container */
.hdf-orders-account {
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* Header */
.hdf-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
}

.hdf-orders-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hdf-orders-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
    line-height: 1.3;
}

.hdf-orders-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    line-height: 1.5;
    position: relative;
    top: -5px;
}

/* Table */
.hdf-orders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hdf-orders-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

/* Column widths – 5 columns */
.hdf-orders-table colgroup .col-order    { width: 18%; }
.hdf-orders-table colgroup .col-camp     { width: 27%; }
.hdf-orders-table colgroup .col-status   { width: 24%; }
.hdf-orders-table colgroup .col-total    { width: 13%; }
.hdf-orders-table colgroup .col-actions  { width: 18%; }

.hdf-orders-table thead th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #667085;
    text-align: left;
    background: #f9fafb;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdf-orders-table thead th:first-child,
.hdf-orders-table tbody td:first-child {
    padding-left: 16px;
}

.hdf-orders-table thead th:last-child,
.hdf-orders-table tbody td:last-child {
    padding-right: 16px;
}

.hdf-orders-table tbody td {
    padding: 14px 12px;
    font-size: 13px;
    color: #101828;
    border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdf-orders-table tbody tr:last-child td {
    border-bottom: none;
}

/* Order number + date stacked */
.hdf-orders-td-number a {
    display: block;
    color: #101828;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hdf-orders-td-number a:hover {
    color: #DB0840;
}

.hdf-orders-date {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 400;
    margin-top: 2px;
}

/* Camp */
.hdf-orders-td-camp {
    font-weight: 500;
}

/* Total */
.hdf-orders-td-total {
    font-weight: 500;
    white-space: nowrap;
}

/* Status badge */
.hdf-order-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 6px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid;
    white-space: nowrap;
}

.hdf-order-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Pending payment */
.hdf-order-status--pending {
    background: #fffaeb;
    color: #93370d;
    border-color: #fedf89;
}
.hdf-order-status--pending .hdf-order-status-dot {
    background: #f79009;
}

/* Processing / On-hold */
.hdf-order-status--processing,
.hdf-order-status--on-hold {
    background: #f8f9fc;
    color: #363f72;
    border-color: #d5d9eb;
}
.hdf-order-status--processing .hdf-order-status-dot,
.hdf-order-status--on-hold .hdf-order-status-dot {
    background: #6172f3;
}

/* Completed */
.hdf-order-status--completed {
    background: #ecfdf3;
    color: #067647;
    border-color: #abefc6;
}
.hdf-order-status--completed .hdf-order-status-dot {
    background: #17b26a;
}

/* Cancelled / Refunded / Failed */
.hdf-order-status--cancelled,
.hdf-order-status--refunded,
.hdf-order-status--failed {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}
.hdf-order-status--cancelled .hdf-order-status-dot,
.hdf-order-status--refunded .hdf-order-status-dot,
.hdf-order-status--failed .hdf-order-status-dot {
    background: #f04438;
}

/* Action buttons */
.hdf-orders-td-actions {
    text-align: right;
    white-space: nowrap;
}

.hdf-order-action {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #344054 !important;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.15s ease;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    margin-left: 4px;
    text-transform: none;
}

.hdf-order-action:first-child {
    margin-left: 0;
}

.hdf-order-action:hover {
    background: #f9fafb;
    border-color: #0b203c;
    color: #0b203c !important;
}

/* Pagination */
.hdf-orders-pagination {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.hdf-orders-page-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #344054 !important;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: all 0.15s ease;
}

.hdf-orders-page-btn:hover {
    background: #f9fafb;
    border-color: #0b203c;
    color: #0b203c !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .hdf-orders-table thead {
        display: none;
    }

    .hdf-orders-table tbody tr {
        display: block;
        padding: 20px;
        border-bottom: 1px solid #eaecf0;
    }

    .hdf-orders-table tbody tr:last-child {
        border-bottom: none;
    }

    .hdf-orders-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: none;
    }

    .hdf-orders-table tbody td::before {
        content: attr(data-title);
        font-size: 12px;
        font-weight: 500;
        color: #667085;
        flex-shrink: 0;
        margin-right: 16px;
    }

    .hdf-orders-td-actions {
        text-align: left;
        padding-top: 12px !important;
    }

    .hdf-orders-td-actions::before {
        display: none;
    }

    .hdf-orders-header {
        padding: 16px 20px 12px;
    }
}

/* Responsive – General */
@media (max-width: 768px) {
    .hdf-warteliste-notice-inner {
        flex-direction: column;
        text-align: center;
    }

    .hdf-warteliste-icon {
        align-self: center;
    }

    .hdf-billing-fields .form-row-first,
    .hdf-billing-fields .form-row-last {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}
