/**
 * Tradeshow Lead Form CSS
 * Matches exact design specs with iPad Kiosk optimization
 */

:root {
    --brand-navy: #0b2e59;
    --brand-navy-dark: #072040;
    --brand-orange: #f26522;
    --side-tab-dark: #1f2937;
    --side-tab-light: #e5e7eb;
    --side-tab-light-text: #6b7280;
    --bg-page: #dbe4ed;
    --card-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-focus: #0b2e59;
    --label-color: #4b5563;
    --status-online: #10b981;
    --status-offline: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
}

/* Top Status Bar */
.top-status-bar {
    width: 100%;
    background-color: var(--status-online);
    color: #ffffff;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.top-status-bar.offline {
    background-color: var(--status-offline);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.status-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    text-decoration: none;
}

.btn-refresh:hover, .btn-refresh:active {
    background: #ffffff;
    color: #0b2e59;
}

.tradeshow-badge {
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Main Form Card */
.form-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 20px auto;
    padding: 0 12px;
}

.form-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Header Banner */
.card-header {
    background-color: var(--brand-navy);
    border-bottom: 4px solid var(--brand-orange);
    padding: 18px 20px;
    text-align: center;
    position: relative;
}

.card-header h1 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-transform: none;
    margin: 0;
}

.card-header .event-subtext {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 4px;
    font-weight: 500;
}

/* Form Content Body */
.card-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Standard Inputs */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field-row {
    display: flex;
    gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

.field-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--label-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.field-label .req {
    color: #dc2626;
    margin-left: 2px;
}

.custom-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background-color: #fcfcfc;
    transition: all 0.2s ease;
    outline: none;
}

.custom-input:focus {
    border-color: var(--brand-navy);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 46, 89, 0.12);
}

.employee-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.employee-input-wrapper {
    position: relative;
    max-width: 220px;
    display: flex;
    align-items: center;
}

.employee-input-wrapper input {
    background-color: #f8fafc;
    font-weight: 600;
    color: #334155;
    padding-right: 32px;
}

.btn-emp-switch {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    padding: 2px 4px;
    border-radius: 4px;
}

.btn-emp-switch:hover {
    color: var(--brand-orange);
}

/* Vertical Tab Box Sections */
.section-box {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
    background: #ffffff;
}

/* Left Vertical Badge/Tab */
.side-tab {
    width: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--side-tab-light);
    color: var(--side-tab-light-text);
    user-select: none;
    border-right: 1px solid #e2e8f0;
    padding: 12px 0;
}

.side-tab.dark {
    background-color: var(--side-tab-dark);
    color: #ffffff;
    border-right: 1px solid var(--side-tab-dark);
}

.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Content Area inside Section Box */
.section-content {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Radio & Checkbox Groups */
.radio-group, .checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
}

.checkbox-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 14px;
}

.checkbox-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
}

.option-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    user-select: none;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--brand-navy);
    cursor: pointer;
}

.option-label-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    margin-right: 8px;
}

/* Ruled Lined Notepad Area for Notes & Customer Questions */
.lined-textarea-wrapper {
    position: relative;
    width: 100%;
}

.lined-textarea {
    width: 100%;
    min-height: 85px;
    line-height: 28px;
    padding: 2px 6px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
    color: #1f2937;
    background-attachment: local;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 27px,
        #e5e7eb 27px,
        #e5e7eb 28px
    );
    resize: vertical;
}

.lined-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #d1d5db;
    padding: 4px 6px;
    font-size: 13px;
    outline: none;
    background: transparent;
    font-family: inherit;
}

.lined-input:focus {
    border-bottom: 1.5px solid var(--brand-navy);
}

/* Submit Lead Button */
.btn-submit-lead {
    width: 100%;
    background-color: var(--brand-navy);
    color: #ffffff;
    border: none;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(11, 46, 89, 0.25);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit-lead:hover {
    background-color: var(--brand-navy-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(11, 46, 89, 0.35);
}

.btn-submit-lead:active {
    transform: translateY(1px);
}

.btn-submit-lead:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Kiosk Success Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-icon-circle {
    width: 70px;
    height: 70px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 16px;
}

.modal-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-navy);
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-modal-ok {
    background: var(--brand-orange);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-modal-ok:hover {
    background: #e05e10;
}

/* PIN Switcher Modal */
.pin-modal-card {
    text-align: left;
}

.pin-modal-card h3 {
    margin-bottom: 4px;
}

.pin-modal-card p {
    margin-bottom: 16px;
}

/* Responsive design for iPad & tablets */
@media (max-width: 640px) {
    .form-wrapper {
        margin: 10px auto;
        padding: 0 8px;
    }
    .card-body {
        padding: 16px;
    }
    .form-field-row {
        flex-direction: column;
    }
    .checkbox-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .side-tab {
        width: 36px;
        min-width: 36px;
    }
    .vertical-text {
        font-size: 9.5px;
    }
}
