/* =========================================================
   Ticketshows CRM â€“ Frontend Technical Sheet Form
   ========================================================= */

/* ---------- Box-sizing reset (aÃ­sla del tema) ---------- */
.tscrm-tech-wrap,
.tscrm-tech-wrap *,
.tscrm-tech-wrap *::before,
.tscrm-tech-wrap *::after {
    box-sizing: border-box;
}

/* ---------- Variables + contenedor raÃ­z ---------- */
.tscrm-tech-wrap {
    --tscrm-tech-primary: #8dc653;
    --tscrm-tech-accent:  #8dc653;
    --tscrm-tech-border:  #e6defc;
    --tscrm-tech-bg:      #f7f5ff;
    --tscrm-tech-text:    #18181b;

    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0;
    color: var(--tscrm-tech-text);
    font-family: inherit;
}

/* ---------- Shell ---------- */
.tscrm-tech-shell {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--tscrm-tech-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(74, 18, 205, 0.12);
}

/* ---------- Header ---------- */
.tscrm-tech-header {
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--tscrm-tech-primary), #8dc653);
    color: #ffffff;
}

.tscrm-tech-header h2 {
    margin: 0 0 8px;
    padding: 0;
    color: #ffffff;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.2;
}

.tscrm-tech-header p {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
}

/* ---------- Steps ---------- */
.tscrm-tech-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 24px;
    background: var(--tscrm-tech-bg);
    border-bottom: 1px solid var(--tscrm-tech-border);
}

.tscrm-tech-step-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--tscrm-tech-border);
    font-size: 12px;
    line-height: 1.3;
    color: #5b5672;
    min-width: 0;
}

.tscrm-tech-step-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.tscrm-tech-step-pill strong {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #ece7ff;
    color: var(--tscrm-tech-primary);
    font-size: 13px;
}

.tscrm-tech-step-pill.is-active {
    border-color: var(--tscrm-tech-primary);
    background: #f4efff;
    color: var(--tscrm-tech-primary);
}

.tscrm-tech-step-pill.is-active strong,
.tscrm-tech-step-pill.is-complete strong {
    background: var(--tscrm-tech-primary);
    color: #ffffff;
}

.tscrm-tech-step-pill.is-complete {
    border-color: #c9baf7;
}

/* ---------- Body / Panel ---------- */
.tscrm-tech-body {
    padding: 32px;
}

.tscrm-tech-form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.tscrm-tech-panel {
    width: 100%;
}

.tscrm-tech-panel h3 {
    margin: 0 0 6px;
    padding: 0;
    color: var(--tscrm-tech-primary);
    font-size: 22px;
    line-height: 1.3;
}

.tscrm-tech-panel > p {
    margin: 0 0 20px;
    padding: 0;
    color: #6b7280;
    font-size: 15px;
}

/* ---------- Grid de campos ---------- */
.tscrm-grid {
    display: grid;
    gap: 5px;
    width: 100%;
    align-items: start;
}

.tscrm-tech-wrap .tscrm-grid > * {
    grid-column: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    align-self: start;
}

.tscrm-tech-wrap .tscrm-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	gap: 0;
}

.tscrm-tech-wrap .tscrm-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* ---------- Labels ---------- */
.tscrm-tech-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    color: #2b2640;
    margin: 0;
    padding: 0;
}

/* ---------- Inputs / Selects / Textarea ---------- */
/* ---------- Inputs ocultos – anula estilos genéricos del tema ---------- */
.tscrm-tech-wrap input[type="hidden"],
.tscrm-tech-form input[type="hidden"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    min-width: 0 !important;
}

/* ---------- Inputs / Selects / Textarea ---------- */
.tscrm-tech-form input[type="text"],
.tscrm-tech-form input[type="email"],
.tscrm-tech-form input[type="date"],
.tscrm-tech-form input[type="time"],
.tscrm-tech-form input[type="number"],
.tscrm-tech-form textarea,
.tscrm-tech-form select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    margin: 0;
    font: inherit;
    font-size: 15px;
    color: #1f1b2d;
    background: #ffffff;
    border: 1.5px solid #d7cef6;
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tscrm-tech-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%234a12cd' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.tscrm-tech-form textarea {
    min-height: 130px;
    resize: vertical;
}

.tscrm-tech-form input[type="text"]:focus,
.tscrm-tech-form input[type="email"]:focus,
.tscrm-tech-form input[type="date"]:focus,
.tscrm-tech-form input[type="time"]:focus,
.tscrm-tech-form input[type="number"]:focus,
.tscrm-tech-form textarea:focus,
.tscrm-tech-form select:focus {
    border-color: var(--tscrm-tech-primary);
    box-shadow: 0 0 0 3px rgba(74, 18, 205, 0.13);
}

.tscrm-tech-form input[readonly] {
    background: #f4f0ff;
    color: #7c6fa0;
    cursor: default;
}

/* ---------- Checkbox inline ---------- */
.tscrm-inline-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    font-weight: 600 !important;
    font-size: 14px;
    margin-top: 4px;
    cursor: pointer;
}

.tscrm-inline-check input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px;
    padding: 0;
    margin: 0;
    border-radius: 5px !important;
    border: 1.5px solid #d7cef6 !important;
    flex-shrink: 0;
}

/* ---------- Check-grid (servicios) ---------- */
.tscrm-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.tscrm-check-card {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--tscrm-tech-border);
    border-radius: 14px;
    background: #fbfaff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.tscrm-check-card:hover {
    border-color: var(--tscrm-tech-primary);
}

.tscrm-check-card input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px;
    padding: 0;
    margin: 0;
    border-radius: 5px !important;
    flex-shrink: 0;
}

/* ---------- Botones de navegaciÃ³n ---------- */
.tscrm-tech-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--tscrm-tech-border);
}

.tscrm-tech-btn,
.tscrm-tech-form button[type="submit"] {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 28px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.tscrm-tech-btn:hover,
.tscrm-tech-form button[type="submit"]:hover {
    opacity: 0.88;
}

.tscrm-tech-btn-primary,
.tscrm-tech-form button[type="submit"] {
    background: var(--tscrm-tech-primary);
    color: #ffffff;
}

.tscrm-tech-btn-secondary {
    background: #efe9ff;
    color: var(--tscrm-tech-primary);
}

/* ---------- Lookup / Localidades / Preventa (cards) ---------- */
.tscrm-lookup-box,
.tscrm-locality-card,
.tscrm-presale-box,
.tscrm-tech-note {
    width: 100%;
    padding: 0px;
    border: 1.5px solid var(--tscrm-tech-border);
    border-radius: 18px;
    background: #ffffff;
}

.tscrm-lookup-head,
.tscrm-locality-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
}

.tscrm-lookup-head h4,
.tscrm-locality-head h4 {
    margin: 0;
    padding: 0;
    color: var(--tscrm-tech-primary);
    font-size: 16px;
}

.tscrm-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ece7ff;
    color: var(--tscrm-tech-primary);
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.tscrm-status-pill.is-found { background: #dcfce7; color: #166534; }
.tscrm-status-pill.is-empty { background: #fef3c7; color: #92400e; }

.tscrm-lookup-helper,
.tscrm-tech-note p,
.tscrm-locality-total {
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.tscrm-lookup-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.tscrm-link-btn {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: #b91c1c;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 0;
    white-space: nowrap;
}

/* ---------- Contenedor de localidades y preventas ---------- */
.tscrm-localities {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.tscrm-presales {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    width: 100%;
}

.tscrm-presale-item {
    width: 97%;
    padding: 16px;
    border: 1.5px solid #ddd6fe;
    border-radius: 14px;
    background: #ffffff;
}

.tscrm-presale-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.tscrm-locality-total {
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

/* ---------- PULEP note ---------- */
.tscrm-tech-note {
    margin-top: 8px;
}

/* ---------- Helper / Error / Success ---------- */
.tscrm-tech-helper {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.tscrm-tech-success,
.tscrm-tech-error {
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: 14px;
    border: 1px solid;
}

.tscrm-tech-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;
}

.tscrm-tech-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ---------- Modal post-envío (ficha técnica) ---------- */
.tscrm-post-submit-body {
    text-align: left;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tscrm-post-submit-body .tscrm-inline-check {
    margin-bottom: 0;
    padding: 10px 12px;
    border: 1px solid var(--tscrm-tech-border);
    border-radius: 12px;
    background: #f7f5ff;
}

.tscrm-post-producer-note {
    margin: 0 !important;
    padding: 0;
    font-size: 13px;
    color: #5b5672;
}

.tscrm-post-submit-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2b2640;
    text-align: left;
}

.tscrm-modal-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: 15px;
    color: #1f1b2d;
    background: #ffffff;
    border: 1.5px solid #d7cef6;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.tscrm-modal-input:focus {
    border-color: var(--tscrm-tech-primary);
    box-shadow: 0 0 0 3px rgba(141, 198, 83, 0.18);
}

.tscrm-modal-actions {
    margin-top: 18px !important;
    padding-top: 16px;
    border-top: 1px solid var(--tscrm-tech-border);
}

.tscrm-post-submit-feedback {
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    background: #f7f5ff;
    color: #5b5672;
    text-align: center;
}

/* ---------- Modal de éxito ---------- */
.tscrm-tech-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 24px;
}

.tscrm-tech-modal.is-visible {
    display: flex;
}

.tscrm-tech-modal-dialog {
    width: 100%;
    max-width: 480px;
    padding: 36px 32px;
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.tscrm-tech-modal-dialog h3 {
    margin: 0 0 12px;
    padding: 0;
    color: var(--tscrm-tech-primary);
    font-size: 26px;
}

.tscrm-tech-modal-dialog p {
    margin: 0 0 8px;
    padding: 0;
    color: #5b5672;
    font-size: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .tscrm-tech-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tscrm-tech-wrap .tscrm-grid-2,
    .tscrm-tech-wrap .tscrm-grid-3,
    .tscrm-check-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tscrm-tech-header,
    .tscrm-tech-body {
        padding: 22px 20px;
    }
}

@media (max-width: 620px) {
    .tscrm-tech-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tscrm-tech-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tscrm-tech-btn,
    .tscrm-tech-form button[type="submit"] {
        width: 100%;
        text-align: center;
    }

    .tscrm-lookup-head,
    .tscrm-locality-head {
        flex-wrap: wrap;
    }

    .tscrm-tech-step-pill span {
        display: none;
    }

    .tscrm-tech-step-pill {
        justify-content: center;
        padding: 10px;
    }

    .tscrm-tech-header,
    .tscrm-tech-body {
        padding: 18px 16px;
    }
}

label.tscrm-check-card {
    padding: 15px;
}