/**
 * Jhopdi Property Submissions Frontend Styles
 */

.jhopdi-property-form-wrapper {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.jhopdi-property-form-wrapper * {
    box-sizing: border-box;
}

/* Header */
.jhopdi-form-header {
    margin-bottom: 35px;
}

.jhopdi-form-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.jhopdi-eyebrow-line {
    width: 28px;
    height: 2px;
    background: #3b82f6;
    display: inline-block;
}

.jhopdi-form-title {
    font-size: 38px;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.15;
    margin: 0 0 12px 0;
}

.jhopdi-form-subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Sections */
.jhopdi-form-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
}

.jhopdi-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.jhopdi-heading-icon {
    width: 38px;
    height: 38px;
    background: #133355;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jhopdi-section-heading h3 {
    font-size: 20px;
    font-weight: 700;
    color: #133355;
    margin: 0;
}

/* Grid Layouts */
.jhopdi-grid-row {
    display: grid;
    gap: 16px;
    width: 100%;
}

.jhopdi-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.jhopdi-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.jhopdi-grid-1 {
    grid-template-columns: 1fr;
}

/* Field Groups */
.jhopdi-field-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.jhopdi-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.jhopdi-optional-tag {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}

.jhopdi-field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 5px;
}

/* Inputs & Selects */
.jhopdi-field-group input[type="text"],
.jhopdi-field-group input[type="tel"],
.jhopdi-field-group input[type="number"],
.jhopdi-field-group input[type="email"],
.jhopdi-field-group select,
.jhopdi-field-group textarea,
.jhopdi-otp-card-body input[type="tel"],
.jhopdi-otp-card-body input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jhopdi-field-group textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.jhopdi-field-group input:focus,
.jhopdi-field-group select:focus,
.jhopdi-field-group textarea:focus,
.jhopdi-otp-card-body input:focus {
    border-color: #65BFE2;
    box-shadow: 0 0 0 3px rgba(101, 191, 226, 0.2);
}

.jhopdi-field-group input::placeholder,
.jhopdi-field-group textarea::placeholder {
    color: #94a3b8;
}

/* Select wrapper */
.jhopdi-select-wrap {
    position: relative;
    width: 100%;
}

.jhopdi-select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px;
    cursor: pointer;
}

/* Live Price Words Preview Badge */
.jhopdi-price-words-preview {
    display: none;
    margin-top: 6px;
    padding: 4px 10px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    animation: jhopdiFadeIn 0.2s ease;
}

/* OTP Sub-Card */
.jhopdi-otp-subcard {
    margin-top: 25px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.jhopdi-otp-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.jhopdi-otp-icon-badge {
    width: 44px;
    height: 52px;
    background: #e0f2fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jhopdi-otp-header-text h4 {
    font-size: 16px;
    font-weight: 700;
    color: #133355;
    margin: 0 0 4px 0;
}

.jhopdi-otp-header-text p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.jhopdi-input-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.jhopdi-input-btn-group input {
    flex: 1;
}

.jhopdi-btn-cyan {
    background: #65BFE2;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.jhopdi-btn-cyan:hover {
    background: #4eaed4;
}

.jhopdi-btn-dark {
    background: #133355;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.jhopdi-btn-dark:hover {
    background: #0d223a;
}

.jhopdi-otp-footnote {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Mock Toast Notification */
.jhopdi-mock-toast {
    margin-top: 15px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    border-radius: 6px;
    color: #065f46;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jhopdi-otp-verify-row {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

.jhopdi-otp-resend-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

.jhopdi-otp-resend-wrap a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.jhopdi-otp-resend-wrap a:hover {
    text-decoration: underline;
}

.jhopdi-verified-status {
    margin-top: 15px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
}

/* Submit Button */
.jhopdi-form-actions {
    margin-top: 30px;
}

.jhopdi-btn-submit {
    width: 100%;
    height: 56px;
    background: #8492a6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.jhopdi-btn-submit.jhopdi-active-submit {
    background: #133355;
}

.jhopdi-btn-submit.jhopdi-active-submit:hover {
    background: #0d223a;
}

.jhopdi-btn-submit:active {
    transform: scale(0.99);
}

.jhopdi-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: jhopdiSpin 0.7s linear infinite;
    display: inline-block;
}

/* Form Feedback */
.jhopdi-form-feedback {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.jhopdi-feedback-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.jhopdi-feedback-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

@keyframes jhopdiSpin {
    to { transform: rotate(360deg); }
}

@keyframes jhopdiFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .jhopdi-form-title {
        font-size: 28px;
    }
    
    .jhopdi-grid-3,
    .jhopdi-grid-2 {
        grid-template-columns: 1fr;
    }

    .jhopdi-input-btn-group {
        flex-direction: column;
    }

    .jhopdi-btn-cyan,
    .jhopdi-btn-dark {
        height: 44px;
        width: 100%;
    }
}
