/* 
 * Registration Premium Styling
 * High-end, "Advanced" UI for Event Registration
 */

:root {
    --reg-primary: #1e293b;
    /* Dark slate (lighter than #1a2b48) */
    --reg-secondary: #22c55e;
    /* Bright green */
    --reg-accent: #3b82f6;
    /* Professional blue */
    --reg-background: #f8fafc;
    /* Light blue-gray bg */
    --reg-glass-bg: rgba(255, 255, 255, 0.95);
    /* More opaque */
    --reg-glass-border: rgba(226, 232, 240, 0.8);
    --reg-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --reg-radius: 20px;
}

/* Premium Container */
.premium-registration-container {
    padding: 30px;
    background: var(--reg-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--reg-glass-border);
    border-radius: var(--reg-radius);
    box-shadow: var(--reg-shadow);
    margin-top: 20px;
    text-align: left !important;
    transition: all 0.3s ease;
}

.premium-registration-container:hover {
    box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.25);
}

/* Table Overhaul */
.premium-table {
    width: 100%;
    margin-bottom: 2rem;
    color: var(--reg-primary);
    vertical-align: top;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.premium-table thead tr {
    background: linear-gradient(135deg, #eafaec 0%, #f4fdf5 100%);
    box-shadow: 0 4px 10px rgba(30, 148, 5, 0.05);
    border-radius: 12px;
}

.premium-table th {
    padding: 16px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #1e9405 !important;
    border-bottom: none;
    border-top: none;
}

.premium-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.premium-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.premium-table tbody tr {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

.premium-table tbody tr:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    background: rgba(43, 197, 7, 0.02);
}

.premium-table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-top: 1px solid rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.premium-table td:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: 12px 0 0 12px;
}

.premium-table td:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: 0 12px 12px 0;
}

/* Advanced Input UI */
.premium-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--reg-primary);
    margin-bottom: 8px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}
.premium-label span.req {
    color: #ef4444;
    font-weight: bold;
    margin-left: 2px;
}
.premium-label small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: normal;
}

.premium-registration-container .col-md-6 {
    margin-bottom: 24px;
}

.premium-input,
.premium-select {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    width: 100%;
    margin-top: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.premium-input:focus,
.premium-select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--reg-secondary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.01);
    transform: translateY(-2px);
}

.premium-input[readonly] {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

/* Button UI */
.premium-btn-add {
    background: linear-gradient(135deg, #2bc507 0%, #1e9405 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(43, 197, 7, 0.3);
    transition: all 0.3s ease;
}

.premium-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 197, 7, 0.4);
    filter: brightness(1.05);
}

.premium-btn-remove {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1.5px solid transparent;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.premium-btn-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Summary Box */
.premium-summary-card {
    background: #ffffff;
    color: var(--reg-primary);
    padding: 30px;
    border-radius: 24px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.premium-summary-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.premium-summary-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--reg-secondary);
}

/* Captcha & Footer Section */
.premium-footer-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Removed completely because blade files do not possess data-label attributes for td content. Use .table-responsive wrappers instead around tables. */

/* ==========================================================================
   Participant Grid Layout & Responsiveness Enhancements
   ========================================================================== */

/* Maximize container space utilization */
.section-card {
    padding: 24px 20px !important;
}

.premium-registration-container {
    padding: 24px !important;
    margin-top: 20px !important;
    border-radius: var(--reg-radius) !important;
}

/* Allow grid to stretch closer to container boundaries */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px !important;
    margin-bottom: 20px !important;
}

.premium-table,
.table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

/* Ensure table headers and cells are left-aligned and do not wrap on desktop */
body .premium-table th,
body .premium-table td,
body .table th,
body .table td {
    padding: 12px 10px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    text-align: left !important;
}

/* Maximize readable inner width of inputs/selects inside tables */
body .premium-table .premium-input,
body .premium-table .premium-select,
body .premium-table .form-control,
body .premium-table .form-select,
body .table .premium-input,
body .table .premium-select,
body .table .form-control,
body .table .form-select {
    padding: 8px 12px !important;
    font-size: 14px !important;
    height: 42px !important;
    line-height: normal !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Desktop sizing constraints to keep inputs spacious and prevent clipping */
@media (min-width: 992px) {
    /* Enforce min-widths so they never compress or clip */
    #playersTable input[name="first_name[]"],
    #playersTable input[name="firstname[]"],
    #playersTable input[name="last_name[]"],
    #playersTable input[name="lastname[]"] {
        min-width: 180px !important;
    }
    #playersTable select[name="ticketType[]"],
    #playersTable select.ticketType {
        min-width: 200px !important;
    }
    #playersTable input[name="member_id[]"] {
        min-width: 120px !important;
    }
    #playersTable select[name="gender[]"] {
        min-width: 100px !important;
    }
    #playersTable select[name="play_format[]"] {
        min-width: 140px !important;
    }
    #playersTable select[name="performed_before[]"] {
        min-width: 120px !important;
    }
    #playersTable input[name="group[]"],
    #playersTable input[name="age[]"] {
        min-width: 100px !important;
    }
    #playersTable select[name="catgory[]"],
    #playersTable select[name="category[]"] {
        min-width: 150px !important;
    }
    #playersTable input[name="amount[]"] {
        min-width: 80px !important;
    }
}

/* Mobile/Tablet Card-based layout to prevent layout break or squishing */
@media (max-width: 991px) {
    .premium-registration-container {
        padding: 16px !important;
        margin-top: 10px !important;
    }

    #playersTable,
    #playersTable tbody,
    #playersTable tr,
    #playersTable td {
        display: block !important;
        width: 100% !important;
    }

    #playersTable thead {
        display: none !important; /* Hide header row */
    }

    #playersTable tr {
        margin-bottom: 20px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        padding: 16px !important;
        background-color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    }

    #playersTable td {
        border: none !important;
        padding: 8px 0 !important;
        background-color: transparent !important;
    }

    /* Target inputs/selects inside table cells */
    #playersTable td input,
    #playersTable td select {
        width: 100% !important;
        min-width: 100% !important;
    }

    /* Hide empty border or decoration on td elements */
    #playersTable td:first-child,
    #playersTable td:last-child {
        border-radius: 0 !important;
        border: none !important;
    }

    /* Dynamically inject labels via data-label attribute */
    #playersTable td[data-label]::before {
        content: attr(data-label);
        display: block !important;
        font-weight: 700 !important;
        font-size: 11px !important;
        color: #1e9405 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 6px !important;
    }

    /* Suppress label injection for fields with empty/no labels like Action column */
    #playersTable td[data-label=""]::before,
    #playersTable td[data-label="Action"]::before {
        display: none !important;
    }

    /* Align action row buttons cleanly to the right */
    #playersTable td:has(.removeRow) {
        display: flex !important;
        justify-content: flex-end !important;
        padding-top: 12px !important;
    }
}