/* ── Campo codice unificato (codice sconto / codice amico) — carrello e checkout ── */

/*
 * L'input usa la classe WooCommerce .input-text e il wrapper .form-row,
 * così eredita automaticamente lo stile dei campi billing/shipping del tema.
 * Il CSS custom copre solo ciò che WooCommerce non gestisce:
 * layout flex input+bottone, uppercase codice, bottone tema, feedback.
 */

/* Nessun contenitore card: il form-row si inserisce naturalmente nella pagina */
.evtix-cart-code-wrap {
    margin-bottom: 0;
}

#evtix_friend_code_field label {
    margin-bottom: 8px;
    display: block;
}

/* Checkout: label più grande */
.woocommerce-checkout #evtix_friend_code_field label {
    font-size: 20px;
}


/* Layout input + bottone fianco a fianco.
   align-items: stretch → il bottone segue sempre l'altezza dell'input,
   qualunque sia il padding che tema/blocchi gli impongono nel contesto. */
.evtix-cart-code-row {
    display: flex !important;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

/* Input: forza lo stesso look del billing form indipendentemente dal contesto */
.evtix-cart-code-input {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-family: 'Courier New', monospace !important;
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 50px !important;
    color: #fff !important;
    box-shadow: none !important;
}

.evtix-cart-code-input::placeholder {
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--the7-base-font-family, "Open Sans", sans-serif);
    color: var(--the7-secondary-text-color, #adafb3);
}

/* Bottone: segue lo stile standard del tema (rosso, arrotondato, Montserrat uppercase).
   Altezza: nessun padding verticale — il bottone si stira sull'altezza della riga
   (align-items: stretch sulla row) e il testo è centrato via flex. Evita il bottone
   "gonfio" nel Cart Block, dove tema/blocchi impongono padding diversi. */
.evtix-cart-code-btn {
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--the7-btn-bg-color, #d0444a) !important;
    color: var(--the7-btn-color, #ffffff) !important;
    border: none !important;
    border-radius: var(--the7-btn-l-border-radius, 50px) !important;
    font-family: var(--the7-btn-l-font-family, "Montserrat", sans-serif) !important;
    font-size: var(--the7-btn-m-font-size, 14px) !important;
    font-weight: var(--the7-btn-l-font-weight, 800) !important;
    text-transform: var(--the7-btn-l-text-transform, uppercase) !important;
    letter-spacing: var(--the7-btn-l-letter-spacing, 0) !important;
    padding: var(--the7-btn-m-padding, 12px 18px) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: var(--the7-btn-m-line-height, 16px) !important;
    height: auto !important;
    min-height: 0 !important;
    cursor: pointer;
    transition: background-color .2s ease;
}

.evtix-cart-code-btn:hover,
.evtix-cart-code-btn:focus {
    background-color: var(--the7-btn-hover-bg-color, #f0a532) !important;
    color: var(--the7-btn-hover-color, #ffffff) !important;
}

.evtix-cart-code-btn:disabled {
    opacity: .55;
    cursor: default;
}

/* Link "Rimuovi codice" */
.evtix-cart-code-remove {
    display: inline-block;
    margin-top: 6px;
    font-family: var(--the7-base-font-family, "Open Sans", sans-serif) !important;
    font-size: var(--the7-text-small-font-size, 13px) !important;
    color: var(--the7-secondary-text-color, #adafb3);
    text-decoration: underline;
    cursor: pointer;
    line-height: 1.4;
    transition: color .15s ease;
}

.evtix-cart-code-remove:hover,
.evtix-cart-code-remove:focus {
    color: #c0392b;
    text-decoration: none;
}

.evtix-cart-code-remove--hidden {
    display: none !important;
}

/* Feedback */
.evtix-code-feedback {
    margin: 0 0 4px !important;
    font-family: var(--the7-base-font-family, "Open Sans", sans-serif) !important;
    font-size: var(--the7-text-small-font-size, 13px) !important;
    line-height: 1.4 !important;
    min-height: 1em;
}

.evtix-code-feedback--success { color: #2d7a2d; }
.evtix-code-feedback--error   { color: #c0392b; }
.evtix-code-feedback--info    { color: var(--the7-secondary-text-color, #adafb3); }

/* Cart Block: nasconde il separatore "OPPURE" tra i pagamenti express
   e "Procedi al pagamento" (resta visibile anche senza bottoni express) */
.wc-block-components-express-payment-continue-rule {
    display: none !important;
}
