/* Tonvux Limo — Front-end Styles
 * Copyright © Tonvux. Registration Number: 1245963
 */

:root {
    --tnvxl-dark:    #1a1a2e;
    --tnvxl-gold:    #c9a84c;
    --tnvxl-text:    #1a1a1a;
    --tnvxl-muted:   #5f6368;
    --tnvxl-border:  #dadce0;
    --tnvxl-bg:      #f8f9fa;
    --tnvxl-white:   #ffffff;
    --tnvxl-success: #1e8e3e;
    --tnvxl-danger:  #d93025;
    --tnvxl-radius:  10px;
    --tnvxl-font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tnvxl-wrap {
    font-family: var(--tnvxl-font);
    color: var(--tnvxl-text);
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Header */
.tnvxl-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--tnvxl-gold);
}
.tnvxl-logo { max-height: 64px; width: auto; }
.tnvxl-company-name { font-size: 20px; font-weight: 700; margin: 0 0 2px; color: var(--tnvxl-dark); }
.tnvxl-form-subtitle { font-size: 13px; color: var(--tnvxl-muted); margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }

/* Sections */
.tnvxl-section {
    background: var(--tnvxl-white);
    border: 1px solid var(--tnvxl-border);
    border-radius: var(--tnvxl-radius);
    padding: 20px;
    margin-bottom: 14px;
}
.tnvxl-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tnvxl-dark);
}
.tnvxl-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: var(--tnvxl-dark);
    color: var(--tnvxl-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.tnvxl-subsection {
    font-size: 13px;
    color: var(--tnvxl-muted);
    margin: 16px 0 12px;
    padding-top: 14px;
    border-top: 1px solid var(--tnvxl-border);
}

/* Fields */
.tnvxl-field { margin-bottom: 14px; }
.tnvxl-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--tnvxl-text); }
.tnvxl-field input[type="text"],
.tnvxl-field input[type="email"],
.tnvxl-field input[type="tel"],
.tnvxl-field input[type="date"],
.tnvxl-field input[type="time"],
.tnvxl-field select,
.tnvxl-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--tnvxl-border);
    border-radius: 6px;
    font-size: 16px; /* 16px prevents iOS zoom */
    font-family: var(--tnvxl-font);
    box-sizing: border-box;
    background: var(--tnvxl-white);
    color: var(--tnvxl-text);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s;
}
.tnvxl-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.tnvxl-field input:focus,
.tnvxl-field select:focus,
.tnvxl-field textarea:focus {
    outline: none;
    border-color: var(--tnvxl-dark);
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}

/* Grid */
.tnvxl-row { display: grid; gap: 12px; }
.tnvxl-row--2 { grid-template-columns: 1fr 1fr; }
.tnvxl-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Mobile — stack all grids */
@media (max-width: 600px) {
    .tnvxl-row--2,
    .tnvxl-row--3 { grid-template-columns: 1fr; }
    .tnvxl-section { padding: 16px; }
    .tnvxl-company-name { font-size: 17px; }
    .tnvxl-submit-btn { font-size: 15px; padding: 14px; }
    .tnvxl-sig-border canvas { height: 130px; }
    .tnvxl-payment-notice { flex-direction: column; gap: 4px; }
    .tnvxl-notice-amount { font-size: 20px; }
}

.req { color: var(--tnvxl-danger); }

/* Terms */
.tnvxl-terms-box {
    background: var(--tnvxl-bg);
    border: 1px solid var(--tnvxl-border);
    border-radius: 6px;
    padding: 14px 16px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--tnvxl-muted);
    line-height: 1.75;
    white-space: pre-wrap;
    -webkit-overflow-scrolling: touch;
}
.tnvxl-terms-empty { font-style: italic; }

/* Checkbox */
.tnvxl-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}
.tnvxl-check-label input[type="checkbox"] {
    margin-top: 3px;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
}

/* Payment notice */
.tnvxl-payment-notice {
    background: #fffbf0;
    border: 1px solid var(--tnvxl-gold);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}
.tnvxl-notice-label { font-size: 14px; font-weight: 600; color: var(--tnvxl-dark); }
.tnvxl-notice-amount { font-size: 22px; font-weight: 700; color: var(--tnvxl-dark); }
.tnvxl-notice-note { font-size: 12px; color: var(--tnvxl-muted); width: 100%; }

/* Card element */
.tnvxl-card-wrap { margin-bottom: 20px; }
.tnvxl-card-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: block; }
.tnvxl-card-element {
    border: 1px solid var(--tnvxl-border);
    border-radius: 6px;
    padding: 14px 12px;
    background: var(--tnvxl-white);
    min-height: 48px;
}
.tnvxl-card-errors { color: var(--tnvxl-danger); font-size: 13px; margin-top: 6px; min-height: 18px; }

/* Signature */
.tnvxl-sig-wrap { margin-bottom: 24px; }
.tnvxl-sig-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.tnvxl-sig-label-row label { font-size: 13px; font-weight: 600; margin: 0; }
.tnvxl-clear-btn {
    font-size: 12px;
    color: var(--tnvxl-muted);
    background: none;
    border: 1px solid var(--tnvxl-border);
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    min-height: 36px; /* touch friendly */
}
.tnvxl-clear-btn:hover { border-color: var(--tnvxl-dark); color: var(--tnvxl-dark); }
.tnvxl-sig-border {
    position: relative;
    border: 2px solid var(--tnvxl-dark);
    border-radius: 6px;
    background: var(--tnvxl-white);
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}
.tnvxl-sig-border canvas { display: block; width: 100%; touch-action: none; }
.tnvxl-sig-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #c8c8c8;
    font-size: 15px;
    pointer-events: none;
    margin: 0;
    white-space: nowrap;
    user-select: none;
    text-align: center;
    width: 100%;
}
.tnvxl-sig-note { font-size: 12px; color: var(--tnvxl-muted); margin-top: 8px; line-height: 1.5; }

/* Submit */
.tnvxl-submit-btn {
    width: 100%;
    background: var(--tnvxl-dark);
    color: var(--tnvxl-white);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
    min-height: 54px;
}
.tnvxl-submit-btn:hover  { background: #2d2d4e; }
.tnvxl-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.tnvxl-secure-note {
    font-size: 12px;
    color: var(--tnvxl-muted);
    text-align: center;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Messages */
.tnvxl-msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.tnvxl-msg--success { background: #e6f4ea; color: var(--tnvxl-success); }
.tnvxl-msg--error   { background: #fce8e6; color: var(--tnvxl-danger); }

/* Success */
.tnvxl-success {
    text-align: center;
    padding: 48px 24px;
    background: var(--tnvxl-white);
    border: 1px solid var(--tnvxl-border);
    border-radius: var(--tnvxl-radius);
}
.tnvxl-success-icon { font-size: 56px; color: var(--tnvxl-success); margin-bottom: 16px; }
.tnvxl-success h3   { font-size: 22px; margin: 0 0 12px; }
.tnvxl-ref-label    { font-size: 14px; color: var(--tnvxl-muted); margin: 20px 0 4px; }
.tnvxl-ref-number   { font-size: 24px; font-weight: 700; letter-spacing: 2px; color: var(--tnvxl-dark); margin: 0; word-break: break-all; }
.tnvxl-success-note { font-size: 13px; color: var(--tnvxl-muted); margin-top: 16px; }
