/* =============================================================================
   SUPPLIER ONBOARDING FORM
   Styles match the partnership-form / importivity-form design system exactly.
   ============================================================================= */

/* ================================
   BASE & RESET
   ================================ */
#sof-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

#sof-container * {
    box-sizing: border-box;
}

/* ================================
   FORM WRAPPER
   ================================ */
#sof-container .form-wrapper {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 20px;
}

/* ================================
   STEP BADGE
   ================================ */
#sof-container .sof-step-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #00B1E2;
    background: #E0F7FD;
    border-radius: 100px;
    padding: 4px 14px;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: "Manrope", sans-serif;
}

/* ================================
   FORM HEADER
   ================================ */
#sof-container .form-header {
    text-align: center;
    margin-bottom: 48px;
}

#sof-container .form-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    font-family: "Manrope", sans-serif;
}

#sof-container .form-subtitle {
    font-size: 18px;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
    font-family: "Manrope", sans-serif;
}

/* ================================
   FORM SECTIONS
   ================================ */
#sof-container .form-section {
    margin-bottom: 20px;
    padding-bottom: 0px;
}

#sof-container .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

/* ================================
   FORM GROUPS & INPUTS
   ================================ */
#sof-container .form-group {
    margin-bottom: 24px;
}

#sof-container .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#sof-container .form-group input[type="text"],
#sof-container .form-group input[type="email"],
#sof-container .form-group input[type="tel"],
#sof-container .form-group input[type="url"],
#sof-container .form-group textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: transparent !important;
    font-family: "Manrope", sans-serif;
    color: #111827;
}

#sof-container .form-group select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: transparent !important;
    font-family: "Manrope", sans-serif;
    color: #111827;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0px center !important;
    padding-right: 30px;
}

#sof-container .form-group input:-webkit-autofill,
#sof-container .form-group input:-webkit-autofill:hover,
#sof-container .form-group input:-webkit-autofill:focus,
#sof-container .form-group input:-webkit-autofill:active,
#sof-container .form-group textarea:-webkit-autofill {
    -webkit-background-clip: text;
    -webkit-text-fill-color: #333;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 20px 20px transparent;
    background-color: transparent !important;
}

#sof-container .form-group input::placeholder,
#sof-container .form-group textarea::placeholder {
    color: #999;
    font-weight: 400;
}

#sof-container .form-group input:focus,
#sof-container .form-group textarea:focus,
#sof-container .form-group select:focus {
    outline: none;
    border-bottom-color: #00B1E2;
    background: transparent !important;
}

#sof-container .form-group input.error,
#sof-container .form-group textarea.error,
#sof-container .form-group select.error {
    border-bottom-color: #dc3545;
    background-color: transparent !important;
}

#sof-container .form-group textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

/* ================================
   FORM ROWS (2-COLUMN LAYOUT)
   ================================ */
#sof-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

#sof-container .form-row .form-group {
    margin-bottom: 0;
}

/* ================================
   ERROR NOTICE
   ================================ */
#sof-container .sof-error-notice {
    background: #FFF5F5;
    border-left: 3px solid #dc3545;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    color: #9B1C1C;
    margin-bottom: 20px;
    font-family: "Manrope", sans-serif;
}

/* ================================
   BUTTONS
   ================================ */
#sof-container .btn-modern {
    width: 100%;
    background-color: transparent !important;
    font-family: "Manrope", "Lexend Deca", sans-serif !important;
    font-size: 16px !important;
    text-transform: none !important;
    background-image: linear-gradient(90deg, #39C3E9 0%, #00B1E2 90%) !important;
    box-shadow: 15px -21px 15px -19px rgba(0, 0, 0, 0.21) inset !important;
    transition-duration: 0.4s !important;
    border-radius: 8px !important;
    padding: 15px 20px !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 120px !important;
    color: #FFFFFF !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

#sof-container .btn-primary {
    background-color: transparent !important;
    background-image: linear-gradient(90deg, #39C3E9 0%, #00B1E2 90%) !important;
    color: #FFFFFF !important;
}

#sof-container .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 15px -21px 15px -19px rgba(0, 0, 0, 0.21) inset, 0 10px 20px rgba(0, 177, 226, 0.3) !important;
}

#sof-container .btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

#sof-container .btn-primary:disabled {
    background-image: linear-gradient(90deg, #D1D5DB 0%, #9CA3AF 90%) !important;
    color: #6B7280 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
}

#sof-container .btn-modern .btn-loader { display: none; }

#sof-container .btn-modern.loading .btn-text,
#sof-container .btn-modern.loading .btn-arrow { display: none; }

#sof-container .btn-modern.loading .btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

#sof-container .btn-loader svg {
    animation: sof-spin 0.8s linear infinite;
}

@keyframes sof-spin { to { transform: rotate(360deg); } }

#sof-container .btn-link {
    background: none;
    border: none;
    color: #6B7280;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    display: inline-block;
    margin-top: 12px;
}
#sof-container .btn-link:hover { color: #374151; }
#sof-container .btn-link:disabled { opacity: 0.5; cursor: not-allowed; }
#sof-container .btn-link-accent { color: #00B1E2; }
#sof-container .btn-link-accent:hover { color: #0093BC; }

/* ================================
   FORM ACTIONS
   ================================ */
#sof-container .form-actions { margin-top: 8px; }

/* ================================
   OTP VERIFY STEP
   ================================ */
#sof-container .sof-verify-header {
    text-align: center;
    margin-bottom: 36px;
}

#sof-container .sof-verify-icon { margin-bottom: 20px; }

#sof-container .sof-otp-group { margin-bottom: 24px; }

#sof-container .sof-otp-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    text-align: center;
    font-family: "Manrope", sans-serif;
}

#sof-container .sof-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#sof-container .sof-otp-digit {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    background: #F9FAFB !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    font-family: "Manrope", sans-serif;
    -webkit-appearance: none;
    appearance: none;
}

#sof-container .sof-otp-digit:focus {
    border-color: #00B1E2 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(0, 177, 226, 0.12);
}

#sof-container .sof-otp-digit.filled {
    border-color: #00B1E2 !important;
    background: #F0FBFE !important;
}

#sof-container .sof-otp-digit.error {
    border-color: #dc3545 !important;
    background: #FFF5F5 !important;
    animation: sof-shake 0.4s ease;
}

@keyframes sof-shake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

#sof-container .sof-resend-row {
    text-align: center;
    margin: 16px 0 4px;
    font-size: 14px;
    color: #6B7280;
    font-family: "Manrope", sans-serif;
}
#sof-container .sof-resend-row p { margin: 0; }

/* ================================
   SUCCESS / DOWNLOAD SCREEN
   ================================ */
#sof-container .success-screen {
    text-align: center;
    padding: 80px 40px;
}

#sof-container .success-icon {
    margin-bottom: 32px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#sof-container .success-screen h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    font-family: "Manrope", sans-serif;
}

#sof-container .success-screen p {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0 0 12px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-family: "Manrope", sans-serif;
}

#sof-container .sof-download-note {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 14px;
}
#sof-container .sof-download-note a {
    color: #00B1E2;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@keyframes successPop {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* ================================
   HONEYPOT
   ================================ */
#sof-container .honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    #sof-container { padding: 20px 16px; }
    #sof-container .form-wrapper { padding: 20px 16px; }
    #sof-container .form-header { margin-bottom: 32px; }
    #sof-container .form-header h2 { font-size: 28px; }
    #sof-container .form-subtitle { font-size: 16px; }
    #sof-container .form-row { grid-template-columns: 1fr; gap: 0; }
    #sof-container .form-row .form-group { margin-bottom: 24px; }
    #sof-container .success-screen { padding: 60px 20px; }
    #sof-container .success-screen h2 { font-size: 24px; }
    #sof-container .success-icon svg { width: 64px; height: 64px; }
}

@media (max-width: 480px) {
    #sof-container .form-wrapper { padding: 16px 12px; }
    #sof-container .form-header h2 { font-size: 24px; }
    #sof-container .form-subtitle { font-size: 14px; }
    #sof-container .sof-otp-digit { width: 42px; height: 52px; font-size: 20px; }
    #sof-container .sof-otp-inputs { gap: 6px; }
}

/* ================================
   ACCESSIBILITY
   ================================ */
#sof-container .btn-modern:focus,
#sof-container input:focus,
#sof-container textarea:focus,
#sof-container select:focus {
    outline: 3px solid rgba(59, 130, 246, 0.3);
    outline-offset: 2px;
}

/* ================================
   REDUCED MOTION
   ================================ */
@media (prefers-reduced-motion: reduce) {
    #sof-container *,
    #sof-container *::before,
    #sof-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
