/**
 * WKDM Dealer Registration - Form Styling
 * Based on WKDM Redesign Design System + Public Page Blueprint
 *
 * Font: Qanelas (loaded by theme)
 * Accent: var(--wkdm-accent) — set dynamically via PHP (Orange or Blue)
 * Dark: #292D35
 * Medium Grey: #585E6D
 * Light Grey: #C2CDE3
 * Error: #F56356
 * Lightest Grey: #EFF2F5
 */

/* =============================================
   Form Wrapper
   ============================================= */
.wkdm-dr-form-wrapper {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: 'Qanelas', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wkdm-dr-form-inner {
    padding: 0;
}

/* =============================================
   Heading & Subheading
   ============================================= */
.wkdm-dr-form-heading {
    font-size: 30px;
    font-weight: 600;
    color: #1D2026;
    line-height: 1.3;
    margin-bottom: 8px;
}

.wkdm-dr-form-subheading {
    font-size: 16px;
    font-weight: 400;
    color: #585E6D;
    line-height: 1.5;
    margin-bottom: 32px;
}

/* =============================================
   Field Groups
   ============================================= */
.wkdm-dr-field-group {
    margin-bottom: 20px;
}

/* =============================================
   Fieldset (Border Label Pattern from Blueprint)
   ============================================= */
.wkdm-dr-fieldset {
    border: 1px solid #C2CDE3;
    border-radius: 6px;
    padding: 0;
    margin: 0;
    position: relative;
    transition: border-color 0.2s ease;
}

.wkdm-dr-fieldset:focus-within {
    border-color: var(--wkdm-accent);
}

.wkdm-dr-fieldset legend {
    font-size: 14px;
    font-weight: 500;
    color: #585E6D;
    padding: 0 5px;
    margin: 0 0 0 15px;
    line-height: 1;
    float: none;
    width: auto;
}

/* =============================================
   Input Fields
   ============================================= */
.wkdm-dr-input {
    font-family: 'Qanelas', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 50px;
    width: 93%;
    border: none;
    padding: 0 20px;
    font-size: 16px;
    color: #292D35;
    background: transparent;
    outline: none;
    margin: -5px 0 0 0;
    box-sizing: border-box;
}

.wkdm-dr-input::placeholder {
    color: #C2CDE3;
}

.wkdm-dr-input:focus {
    outline: none;
    box-shadow: none;
}

/* =============================================
   Field Errors
   ============================================= */
.wkdm-dr-field-error {
    font-size: 13px;
    color: #F56356;
    margin-top: 6px;
    min-height: 0;
    line-height: 1.4;
}

.wkdm-dr-fieldset.has-error {
    border-color: #F56356;
}

/* =============================================
   Domain Mismatch Warning
   ============================================= */
.wkdm-dr-domain-warning {
    margin-bottom: 16px;
}

.wkdm-dr-warning-text {
    font-size: 14px;
    color: #F56356;
    line-height: 1.5;
    margin: 0;
    padding: 12px 16px;
    background: rgba(245, 99, 86, 0.08);
    border-radius: 6px;
    border-left: 3px solid #F56356;
}

/* =============================================
   File Upload Area
   ============================================= */
.wkdm-dr-upload-group {
    margin-bottom: 20px;
}

.wkdm-dr-fieldset-upload {
    padding: 16px 20px;
}

.wkdm-dr-fieldset-upload legend {
    margin-bottom: 4px;
}

.wkdm-dr-upload-area {
    text-align: center;
    padding: 16px 0 8px;
}

.wkdm-dr-file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
}

.wkdm-dr-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #EFF2F5;
    border: 1px dashed #C2CDE3;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #585E6D;
    font-size: 14px;
    font-weight: 500;
}

.wkdm-dr-upload-label:hover {
    background: #e6eaf0;
    border-color: var(--wkdm-accent);
    color: var(--wkdm-accent);
}

.wkdm-dr-upload-icon {
    display: flex;
    align-items: center;
}

.wkdm-dr-upload-icon svg {
    width: 20px;
    height: 20px;
}

.wkdm-dr-upload-hint {
    font-size: 12px;
    color: #C2CDE3;
    margin-top: 8px;
    margin-bottom: 0;
}

.wkdm-dr-file-name {
    font-size: 13px;
    color: #585E6D;
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 500;
}

.wkdm-dr-file-name.has-file {
    color: #28CF99;
}

/* =============================================
   General Error (above submit button)
   ============================================= */
.wkdm-dr-general-error {
    text-align: center;
}

/* =============================================
   Submit Button
   ============================================= */
.wkdm-dr-submit-group {
    margin-top: 28px;
    margin-bottom: 16px;
}

.wkdm-dr-submit-btn {
    font-family: 'Qanelas', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 220px;
    margin: 0 auto;
    height: 46px;
    padding: 0 32px;
    background: var(--wkdm-accent);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    outline: none;
}

.wkdm-dr-submit-btn:hover {
    background: var(--wkdm-accent-hover);
}

.wkdm-dr-submit-btn:active {
    background: var(--wkdm-accent-active);
}

.wkdm-dr-submit-btn:disabled {
    background: #C2CDE3;
    cursor: not-allowed;
}

.wkdm-dr-btn-spinner svg {
    animation: wkdm-dr-spin 1s linear infinite;
}

@keyframes wkdm-dr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   Contact Info
   ============================================= */
.wkdm-dr-contact-info {
    font-size: 13px;
    color: #585E6D;
    text-align: center;
    line-height: 1.5;
    margin-top: 0;
}

.wkdm-dr-contact-info a {
    color: var(--wkdm-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.wkdm-dr-contact-info a:hover {
    color: var(--wkdm-accent-hover);
    text-decoration: underline;
}

/* =============================================
   Success Modal
   ============================================= */
.wkdm-dr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wkdm-dr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 32, 38, 0.8);
}

.wkdm-dr-modal-content {
    position: relative;
    background: #ffffff;
    padding: 60px 60px;
    border-radius: 8px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wkdm-dr-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1D2026;
    line-height: 1.4;
    margin-bottom: 16px;
}

.wkdm-dr-modal-message {
    font-size: 16px;
    color: #585E6D;
    line-height: 1.5;
    margin-bottom: 32px;
}

.wkdm-dr-modal-btn {
    font-family: 'Qanelas', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: inline-block;
    padding: 14px 48px;
    background: var(--wkdm-accent);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wkdm-dr-modal-btn:hover {
    background: var(--wkdm-accent-hover);
}

/* =============================================
   reCAPTCHA Wrapper
   ============================================= */
.wkdm-dr-recaptcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .wkdm-dr-form-wrapper {
        padding: 16px 0;
    }

    .wkdm-dr-form-heading {
        font-size: 24px;
    }

    .wkdm-dr-form-subheading {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .wkdm-dr-input {
        height: 46px;
        font-size: 16px;
    }

    .wkdm-dr-submit-btn {
        height: 48px;
    }

    .wkdm-dr-modal-content {
        padding: 40px 24px;
    }

    .wkdm-dr-modal-title {
        font-size: 20px;
    }

    .wkdm-dr-modal-message {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    .wkdm-dr-input {
        height: 54px;
    }
}

/* =============================================
   Video Section (white box below form)
   ============================================= */
.wkdm-dr-video-section {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 0;
}

.wkdm-dr-video-heading {
    font-family: 'Qanelas', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #292D35;
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.3;
}

.wkdm-dr-video-wrapper {
    border-radius: 8px;
    overflow: hidden;
}

.wkdm-dr-video-wrapper iframe {
    border-radius: 8px;
}
