/* Company portal form — shared validation, hero, and stepper styles */

.logo-white {
    filter: brightness(0) invert(1);
}

@keyframes heroDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--drift, -720px)); }
}

.hero-wave {
    animation-name: heroDrift;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .hero-wave {
        animation: none;
    }
}

/* Form field validation */
.field-control.is-invalid {
    border-color: #f43f5e !important;
    --tw-ring-color: #fecdd3;
}

.field-control.is-invalid:focus {
    border-color: #e11d48 !important;
    --tw-ring-color: #fecdd3;
}

#passportDropzone.is-invalid {
    background-color: #fff1f2;
    border-color: #f43f5e !important;
}

/* Document upload validation */
.company-portal-docs .cp-doc-card.is-invalid {
    border-color: #f43f5e;
    box-shadow: 0 0 0 1px #fecdd3;
}

.company-portal-docs .cp-doc-card__field-error {
    display: none;
    margin: 0 1.25rem 0.75rem;
    font-size: 0.75rem;
    color: #e11d48;
}

.company-portal-docs .cp-doc-card.is-invalid .cp-doc-card__field-error {
    display: block;
}

/* Form stepper */
.cp-form-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.cp-form-stepper__step {
    display: flex;
    height: 1.5rem;
    width: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.cp-form-stepper__step--active {
    background-color: var(--cp-brand, #3b82f6);
    color: #fff;
}

.cp-form-stepper__step--complete {
    background-color: var(--cp-brand, #3b82f6);
    color: #fff;
}

.cp-form-stepper__step--pending {
    background-color: #e2e8f0;
    color: #64748b;
}

.cp-form-stepper__label {
    font-size: 0.75rem;
}

.cp-form-stepper__label--active {
    font-weight: 600;
    color: #334155;
}

.cp-form-stepper__label--pending {
    font-weight: 500;
    color: #94a3b8;
}

.cp-form-stepper__connector {
    height: 1px;
    width: 2rem;
}

.cp-form-stepper__connector--complete {
    background-color: color-mix(in srgb, var(--cp-brand, #3b82f6) 40%, transparent);
}

.cp-form-stepper__connector--pending {
    background-color: #e2e8f0;
}

/* Support footer */
.cp-support-footer {
    margin-top: auto;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background-color: #eef3f8;
}

/* Colour field — swatch + hex (branding / theme pickers) */
.su-color-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.su-color-field__label {
    margin: 0;
    color: #8a9bb0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.su-color-field__row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.su-color-field__swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0.2rem;
    border: 1px solid #c5d4e8;
    border-radius: 0.55rem;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(197, 212, 232, 0.35);
}

.su-color-field__swatch:hover {
    border-color: #9eb6d4;
}

.su-color-field__swatch:focus-within {
    border-color: #7aa2d4;
    box-shadow: 0 0 0 3px rgba(122, 162, 212, 0.22);
}

.su-color-field__picker {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.35rem;
    background: var(--su-swatch, #ffffff);
    cursor: pointer;
}

.su-color-field__picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.su-color-field__picker::-webkit-color-swatch {
    border: 0;
    border-radius: 0.35rem;
}

.su-color-field__picker::-moz-color-swatch {
    border: 0;
    border-radius: 0.35rem;
}

.su-color-field__hex {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.5rem;
    padding: 0 0.85rem;
    border: 1px solid #d5deea;
    border-radius: 0.55rem;
    background: #fff;
    color: #334155;
    font-size: 0.95rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.01em;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.su-color-field__hex::placeholder {
    color: #94a3b8;
}

.su-color-field__hex:hover:not(:disabled) {
    border-color: #b8c7db;
}

.su-color-field__hex:focus {
    border-color: #7aa2d4;
    box-shadow: 0 0 0 3px rgba(122, 162, 212, 0.18);
}

.su-color-field__hex:disabled,
.su-color-field__picker:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Shared popup / page form fields */
.form-group,
.cd-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-full,
.cd-form-full {
    grid-column: 1 / -1;
}

.form-label,
.cd-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.required,
.cd-req {
    color: #e74c3c;
}

.form-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #687c94;
}

.form-input,
.cd-form-input {
    width: 100%;
    border: 1px solid var(--xp-border, #d1d5db);
    border-radius: 0.55rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: var(--xp-text, #1a1a2e);
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.form-input:focus,
.cd-form-input:focus {
    border-color: var(--xp-navy, #18334f);
    box-shadow: 0 0 0 3px rgba(24, 51, 79, 0.12);
}

.form-input.is-invalid,
.cd-form-input.is-invalid {
    border-color: #f43f5e;
}

.form-input.is-invalid:focus,
.cd-form-input.is-invalid:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.form-input:disabled,
.cd-form-input:disabled {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.form-error {
    margin: 0;
    font-size: 0.75rem;
    color: #e11d48;
}

/* Shared.Ui _fileInput drop zone */
.su-file-input {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.su-file-input__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2d3d;
}

.su-file-input__zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 24px;
    min-height: 160px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #f5f7fa;
    overflow: hidden;
}

.su-file-input__zone--active,
.su-file-input__zone:hover {
    border-color: #18334f;
    background: #eef3f8;
}

.su-file-input__zone--filled {
    border-style: solid;
    border-color: #b7d7c3;
    background: #f4faf6;
}

.su-file-input__zone--busy {
    pointer-events: none;
    opacity: 0.9;
    cursor: wait;
}

.su-file-input__zone--disabled {
    pointer-events: none;
    opacity: 0.65;
    cursor: not-allowed;
}

.su-file-input__zone--invalid {
    border-color: #f43f5e;
    background: #fff1f2;
}

.su-file-input__native,
input.su-file-input__native,
input[type="file"].su-file-input__native {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.01 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    border: 0 !important;
    font-size: 0 !important;
}

.su-file-input__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    pointer-events: none;
}

.su-file-input__icon {
    color: #438dd9d4;
}

.su-file-input__icon--filled {
    color: #1b6b3a;
}

.su-file-input__status {
    font-weight: 700;
    font-size: 0.86rem;
    color: #1b6b3a;
}

.su-file-input__status--busy {
    color: #18334f;
}

.su-file-input__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2d3d;
    word-break: break-all;
}

.su-file-input__size {
    font-size: 0.82rem;
    color: #5f738a;
    font-weight: 600;
}

.su-file-input__hint {
    font-size: 0.78rem;
    color: #8ea1b7;
}

.su-file-input__placeholder {
    font-size: 0.88rem;
    color: #8ea1b7;
    line-height: 1.45;
}

.su-file-input__browse {
    font-weight: 700;
    color: #18334f;
}
