/**
 * ITS Travel Agent Portal — Frontend Styles
 * Designed to work with the Salient/Nectar theme.
 */

/* ── Agent Top Bar ─────────────────────────────────────── */
.its-agent-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a365d 100%);
    color: #fff;
    padding: 10px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
}
.its-agent-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.its-agent-bar-badge {
    background: #c9a84c;
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
}
.its-agent-bar-name {
    font-size: 14px;
    font-weight: 500;
}
.its-agent-bar-discount {
    background: rgba(255,255,255,0.15);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: auto;
}
.its-agent-bar-logout {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    text-decoration: none;
    margin-left: 8px;
}
.its-agent-bar-logout:hover {
    color: #fff;
}

/* ── Admin Note (visible to admins only) ───────────────── */
.its-admin-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #92400e;
}
.its-admin-note a {
    color: #92400e;
    font-weight: 600;
}

/* ── Landing Page ──────────────────────────────────────── */
.its-landing {
    max-width: 800px;
    margin: 0 auto;
}
.its-landing-hero {
    text-align: center;
    padding: 40px 20px 32px;
}
.its-landing-icon {
    color: #1e3a5f;
    margin-bottom: 16px;
}
.its-landing-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}
.its-landing-subtitle {
    font-size: 16px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}
.its-landing-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 8px;
}
@media (max-width: 640px) {
    .its-landing-columns {
        grid-template-columns: 1fr;
    }
}
.its-landing-login,
.its-landing-register {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
}
.its-landing-login h3,
.its-landing-register h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1a1a1a;
}
.its-landing-register p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}
.its-landing-benefits {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}
.its-landing-benefits li {
    padding: 6px 0 6px 24px;
    position: relative;
    font-size: 14px;
    color: #374151;
}
.its-landing-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
}

/* ── Login Form ────────────────────────────────────────── */
.its-login-form {
    margin: 0;
}
.its-form-group {
    margin-bottom: 16px;
}
.its-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.its-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.its-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.its-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.its-checkbox {
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.its-checkbox input[type="checkbox"] {
    margin: 0;
}
.its-forgot-link {
    font-size: 13px;
    color: #1e3a5f;
    text-decoration: none;
}
.its-forgot-link:hover {
    text-decoration: underline;
}

/* ── Buttons ───────────────────────────────────────────── */
.its-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.4;
}
.its-btn-block {
    display: block;
    width: 100%;
}
.its-btn-primary {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}
.its-btn-primary:hover {
    background: #162d4a;
    color: #fff;
}
.its-btn-secondary {
    background: #c9a84c;
    color: #1a1a1a;
    border-color: #c9a84c;
}
.its-btn-secondary:hover {
    background: #b8963d;
    color: #1a1a1a;
}
.its-btn-outline {
    background: transparent;
    color: #6b7280;
    border-color: #d1d5db;
}
.its-btn-outline:hover {
    background: #f9fafb;
    color: #374151;
}

/* ── Messages ──────────────────────────────────────────── */
.its-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.its-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.its-message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ── Gate Messages (pending/rejected/register) ─────────── */
.its-gate-message {
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
    padding: 40px;
    border-radius: 12px;
}
.its-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}
.its-gate-message h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.its-gate-message p {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 8px 0;
}
.its-gate-contact {
    margin-top: 20px !important;
}
.its-gate-contact a {
    color: #1e3a5f;
    font-weight: 600;
}
.its-gate-pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.its-gate-rejected {
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.its-gate-register {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.its-note {
    font-size: 13px;
    color: #9ca3af;
}
.its-note a {
    color: #1e3a5f;
}

/* ── Portal: Single-page layout ───────────────────────── */
.its-portal {
    max-width: 800px;
    margin: 0 auto;
}

/* ── Portal: Login Banner ─────────────────────────────── */
.its-portal-login-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 32px;
    overflow: hidden;
}
.its-portal-login-banner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}
.its-portal-login-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #475569;
}
.its-portal-login-banner-text svg {
    color: #1e3a5f;
    flex-shrink: 0;
}
.its-portal-login-toggle {
    background: #1e3a5f;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}
.its-portal-login-toggle:hover {
    background: #162d4a;
}
.its-toggle-arrow {
    font-size: 10px;
    line-height: 1;
}

/* ── Portal: Collapsible login form ───────────────────── */
.its-portal-login-collapse {
    padding: 0 20px 20px;
    border-top: 1px solid #e2e8f0;
}
.its-portal-login-form {
    padding-top: 16px;
}
.its-portal-login-fields {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.its-portal-login-fields .its-form-group {
    flex: 1;
    margin-bottom: 10px;
}
.its-portal-login-fields .its-portal-login-submit {
    flex: 0 0 auto;
}
.its-portal-login-fields .its-portal-login-submit .its-btn {
    padding: 10px 24px;
    height: 42px;
    line-height: 1;
}
.its-portal-login-fields .its-input {
    padding: 9px 14px;
    height: 42px;
    box-sizing: border-box;
}
.its-portal-login-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media (max-width: 640px) {
    .its-portal-login-banner-row {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .its-portal-login-fields {
        flex-direction: column;
        gap: 0;
    }
    .its-portal-login-fields .its-portal-login-submit {
        width: 100%;
    }
    .its-portal-login-fields .its-portal-login-submit .its-btn {
        width: 100%;
        display: block;
    }
}

/* ── Portal: Registration section ─────────────────────── */
.its-portal-registration {
    /* Fluent Forms styling adjustments */
}
.its-portal-registration .fluentform {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
}

/* ── Agent Pricing (CHBS override) ─────────────────────── */
.its-price-agent {
    font-weight: 700;
    color: #16a34a;
}
.its-price-original {
    display: block;
    font-size: 0.75em;
    color: #9ca3af;
    text-decoration: line-through;
    margin-top: 2px;
}
