/**
 * My Tickets - Premium Clean Style (Shotgun Paiement-like)
 * Version: 4.0
 * Unified to match the "Paiement" step design: Orange background container, white inline bars for tickets, yellow pill inputs.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* ========================================
   VARIABLES FRONTEND KILI'EVENT
   ======================================== */
:root {
    --kili-space-xs: 4px;
    --kili-space-sm: 8px;
    --kili-space-md: 12px;
    --kili-space-lg: 16px;
    --kili-space-xl: 24px;
    --kili-space-xxl: 32px;
    --kili-radius-sm: 4px;
    --kili-radius-md: 8px;
    --kili-radius-lg: 16px;
}

/* ========================================
   MAIN CONTAINER OVERRIDES
   ======================================== */
/* Hide useless empty response div taking space */
.mt-response:empty, #mt-response-13 {
    display: none !important;
}

/* The .my-tickets.kili-bg (orange wrapper from mt-cart.css) handles the orange background.
   We make the inner .mt-order.my-tickets transparent so elements float on the orange. */
.mt-order.my-tickets {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: transparent !important;
    color: #ffffff; /* Default text color on orange */
    box-shadow: none !important;
    padding: 16px 0;
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* Fieldset cleanup */
.mt-order.my-tickets .ticket-orders fieldset {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.mt-order.my-tickets .ticket-orders legend {
    display: none !important;
}

/* Typography on Orange background */
h3, .mt-ticket-details-list h3,
.mt-order.my-tickets h3,
.mt-order.my-tickets h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 20px;
    margin-bottom: 20px;
    color: #ffffff !important;
}

/* ========================================
   TICKET ROWS: ADD-TO-CART (.mt-ticket-field) & CART (.mt-ticket-line)
   These perfectly match the White Bar from the Payment page screenshot.
   ======================================== */
.mt-order.my-tickets .mt-ticket-field,
.mt-ticket-line {
    background: #ffffff !important;
    border-radius: var(--kili-radius-sm, 4px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    padding: 12px 16px !important;
    margin-bottom: 8px !important;
    border: none !important;
}

.mt-order.my-tickets .mt-ticket-field,
.mt-ticket-line.desktop-version {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.mt-ticket-line.mobile-version {
    display: none !important; /* Force hide duplicate mobile rows on desktop */
}

/* Ticket Name / Title */
.mt-order.my-tickets .mt-ticket-field label,
.mt-ticket-line .mt-ticket-label {
    flex: 1 1 auto;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin: 0 !important;
    text-align: left;
    white-space: nowrap;
}

/* The Price */
.mt-order.my-tickets .ticket-pricing,
.mt-ticket-line .mt-ticket-price {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--kili-orange, #E64C2E) !important;
    margin-left: 12px !important;
    flex: 0 0 auto;
    text-align: right;
}

/* ========================================
   INPUTS STYLED AS YELLOW PILLS (HELLO WORLD 20)
   Target: Step 2 Attendee Inputs
   ======================================== */
.mt-ticket-line input[type="text"],
.mt-ticket-line input[type="number"] {
    background: #f3b338 !important; /* Yellow badge color */
    color: #ffffff !important;
    border: none !important;
    border-radius: 99px !important; /* Pill shape */
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    width: 60px; /* Base width without important so JS can override inline */
    min-width: 40px !important;
    max-width: 150px !important;
    box-sizing: border-box !important;
    flex: 0 1 auto !important;
    margin: 0 4px !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

.mt-ticket-line input[type="number"]::-webkit-outer-spin-button,
.mt-ticket-line input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mt-ticket-line input::placeholder {
    color: #ffffff !important;
    opacity: 0.9 !important;
}

.mt-ticket-line input:focus {
    background: #d99c2b !important; /* Darker yellow on focus */
    cursor: text;
}

/* Helper container for cart ticket inputs to keep them grouped */
.mt-ticket-line .mt-ticket-inputs-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ========================================
   QUANTITY CONTROLS (Add-to-cart step)
   Styled similarly to the badges for a coherent UI
   ======================================== */
.mt-order.my-tickets .mt-ticket-input {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}
.mt-order.my-tickets .mt-ticket-input button {
    background: #f3b338 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 99px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    cursor: pointer;
    padding: 0 !important;
}
.mt-order.my-tickets .mt-ticket-input input[type="number"] {
    background: #f3b338 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 99px !important;
    height: 24px !important;
    width: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0 !important;
    -moz-appearance: textfield;
}
.mt-order.my-tickets .mt-ticket-input input[type="number"]::-webkit-outer-spin-button,
.mt-order.my-tickets .mt-ticket-input input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Info tags as yellow pills (Tickets remaining) */
.mt-order.my-tickets .mt-ticket-field .tickets-remaining {
    background: #f3b338 !important;
    color: #fff !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    margin-right: auto !important;
    text-transform: uppercase !important;
}
.mt-order.my-tickets .mt-ticket-field .mt-closure-date {
    display: none !important;
}

/* ========================================
   INFORMATIONS COMMANDE (Global Order Form)
   Lightweight 2-column form as requested
   ======================================== */

.mt-order.my-tickets .mt_cart_total,
.mt-order.my-tickets .mt_cart_label {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    text-align: right;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.2) !important;
    margin-top: 16px;
}

/* Grid layout for the order details */
.mt-details-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-top: 16px !important;
}

.mt-details-grid .mt-grid-col {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

/* Since the background is orange, labels should be white */
.mt-details-grid label {
    color: #ffffff !important;
    font-weight: 500 !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    display: block !important;
}

/* Crisp white inputs for the form */
.mt-details-grid input {
    height: 48px !important;
    width: 100% !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: var(--kili-radius-sm, 4px) !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    color: var(--kili-black, #111) !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    outline: none !important;
    transition: box-shadow 0.2s ease !important;
}

.mt-details-grid input::placeholder {
    color: rgba(0,0,0,0.4) !important;
    font-weight: 400 !important;
}

.mt-details-grid input:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3) !important;
}

/* ========================================
   SUBMIT BUTTONS
   ======================================== */
.mt-order.my-tickets button[name="mt_add_to_cart"],
.mt-order.my-tickets .mt-cart-button,
.mt-order.my-tickets .mt-badge-yellow,
.mt-order.my-tickets button[type="submit"],
.mt-order.my-tickets input[type="submit"] {
    background: #6E6EBB !important; /* Secondary branding color */
    color: #ffffff !important;
    border: none !important;
    border-radius: 99px !important;
    padding: 14px 32px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(110, 110, 187, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 24px !important;
}

.mt-order.my-tickets button:hover,
.mt-order.my-tickets input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(110, 110, 187, 0.5) !important;
}

.mt-order.my-tickets form.mt-cart-form {
    display: flex;
    flex-direction: column;
}

/* Mobile responsive */
@media (max-width: 768px) {
    /* Swap Desktop/Mobile Cartesian modes */
    .mt-ticket-line.desktop-version {
        display: none !important;
    }
    .mt-ticket-line.mobile-version {
        display: block !important;
        background: #ffffff !important;
        border-radius: var(--kili-radius-sm, 4px) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }

    .mt-ticket-line.mobile-version .mt-ticket-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .mt-ticket-line.mobile-version .mt-ticket-toggle {
        background: transparent !important;
        border: 1px solid rgba(0,0,0,0.2) !important;
        color: #111 !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        cursor: pointer !important;
        margin-left: 8px !important;
    }

    /* Keep it inline if possible, or gracefully stack just the price for add-to-cart (.mt-ticket-field) */
    .mt-ticket-field {
        flex-wrap: wrap !important;
    }
    .mt-order.my-tickets .mt-ticket-field label {
        flex: 100% !important;
        margin-bottom: 8px !important;
    }
    
    .mt-ticket-line input[type="text"],
    .mt-ticket-line input[type="number"] {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 4px 0 !important;
        border-radius: 8px !important; /* Slightly less round for full width bars */
    }

    .mt-details-grid {
        grid-template-columns: 1fr !important;
    }
}
