/* DigiJobs — Frontend Form Styles | Vivek Kumar | digigyor.com */

.digijobs-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    box-sizing: border-box;
}

.digijobs-form-header {
    margin-bottom: 28px;
}

.digijobs-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: inherit;
}

.digijobs-form-header p {
    color: inherit;
    opacity: 0.7;
    margin: 0;
    font-size: 15px;
}

/* ── Success / Error Messages ── */
.digijobs-success-msg,
.digijobs-error-msg {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.digijobs-success-msg { background: #eafaf1 !important; border: 1px solid #2ecc71 !important; color: #1a7a43 !important; }
.digijobs-error-msg   { background: #fef0f0 !important; border: 1px solid #e74c3c !important; color: #922b21 !important; }

/* ── Form Layout ── */
#digijobs-form {
    display: block;
}

.digijobs-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
}

.digijobs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.digijobs-half { flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px); min-width: 0; }
.digijobs-full { flex: 1; }

/* ── Labels ── */
.digijobs-field label {
    font-size: 14px;
    font-weight: 600;
    color: inherit !important;
    display: block !important;
}

.digijobs-field label .req {
    color: #e74c3c !important;
    margin-left: 2px;
}

/* ── Inputs, Selects, Textareas ── */
.digijobs-field input[type="text"],
.digijobs-field input[type="email"],
.digijobs-field input[type="tel"],
.digijobs-field textarea {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box !important;
    font-family: inherit !important;
    appearance: none;
    -webkit-appearance: none;
    line-height: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Select shares layout/border/font — background-color kept separate so SVG arrow is never wiped */
.digijobs-field select {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box !important;
    font-family: inherit !important;
    appearance: none;
    -webkit-appearance: none;
    line-height: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Placeholder text */
.digijobs-field input::placeholder,
.digijobs-field textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}
.digijobs-field input::-webkit-input-placeholder,
.digijobs-field textarea::-webkit-input-placeholder { color: #999 !important; opacity: 1 !important; }
.digijobs-field input::-moz-placeholder,
.digijobs-field textarea::-moz-placeholder           { color: #999 !important; opacity: 1 !important; }
.digijobs-field input:-ms-input-placeholder,
.digijobs-field textarea:-ms-input-placeholder       { color: #999 !important; opacity: 1 !important; }

.digijobs-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 38px !important;
}

/* Select option text — force dark text */
.digijobs-field select option {
    color: #1a1a1a !important;
    background: #ffffff !important;
}

/* ── Nice Select plugin compatibility ──────────────────────────────
   Some themes/plugins replace <select> with a .nice-select div.
   We style it to match our inputs so it picks up admin color settings.
   ------------------------------------------------------------------ */
.digijobs-field .nice-select {
    width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 11px 38px 11px 14px !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
    float: none !important;
    display: block !important;
    /* remove nice-select's own arrow */
    box-shadow: none !important;
}

.digijobs-field .nice-select::after {
    display: none !important;
}

.digijobs-field .nice-select .current {
    color: inherit !important;
    font-size: inherit !important;
    font-family: inherit !important;
}

/* Dropdown list panel */
.digijobs-field .nice-select .list {
    width: 100% !important;
    background-color: #ffffff !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
}

/* Each option in the list */
.digijobs-field .nice-select .option {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    font-size: 15px !important;
    font-family: inherit !important;
    padding: 10px 14px !important;
    line-height: 1.4 !important;
}

.digijobs-field .nice-select .option:hover,
.digijobs-field .nice-select .option.focus,
.digijobs-field .nice-select .option.selected {
    background-color: #f0f4ff !important;
    color: #1a1a2e !important;
}

.digijobs-field .nice-select:focus,
.digijobs-field .nice-select.open {
    border-color: #1a1a2e !important;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08) !important;
    outline: none !important;
}

.digijobs-field input:focus,
.digijobs-field select:focus,
.digijobs-field textarea:focus {
    outline: none !important;
    border-color: #1a1a2e !important;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08) !important;
}

.digijobs-field textarea {
    resize: vertical;
}

/* ── File Upload — Drag & Drop Zone ── */
.dj-drop-hint {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

.dj-drop-zone {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed #c7c7d0;
    border-radius: 14px;
    background: #f8f8fb;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.dj-drop-zone:hover,
.dj-drop-zone:focus {
    border-color: #6366f1;
    background: #f0f0ff;
    box-shadow: 0 0 0 4px rgba(99,102,241,.08);
}

.dj-drop-zone.dj-drag-over {
    border-color: #6366f1;
    background: #ebebff;
    box-shadow: 0 0 0 5px rgba(99,102,241,.14);
}

.dj-drop-zone.dj-has-file {
    border-style: solid;
    border-color: #22c55e;
    background: #f0fdf4;
    cursor: default;
}

.dj-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.dj-drop-idle {
    pointer-events: none;
}

.dj-drop-icon {
    color: #a5b4fc;
    margin-bottom: 10px;
    line-height: 1;
}

.dj-drop-title {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
}

.dj-drop-sub {
    font-size: 13px;
    color: #9ca3af;
}

.dj-drop-browse {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Chosen file state ── */
.dj-drop-chosen {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.dj-drop-file-icon {
    color: #22c55e;
    flex-shrink: 0;
}

.dj-drop-file-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.dj-drop-fname {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.dj-drop-fsize {
    font-size: 12px;
    color: #64748b;
    display: block;
}

.dj-drop-remove {
    background: #fee2e2 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    color: #ef4444 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    transition: background 0.18s;
    margin-left: 4px;
}

.dj-drop-remove:hover {
    background: #fecaca !important;
}

/* ── Error state ── */
.dj-drop-zone.dj-drop-error {
    border-color: #ef4444;
    background: #fff5f5;
}

.dj-drop-err-msg {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
}

/* ── Submit Button ── */
.digijobs-submit-row {
    margin-top: 26px;
}

.digijobs-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #1a1a2e !important;
    background-color: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 34px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit !important;
}

.digijobs-btn:hover {
    background: #2d2d5e !important;
    background-color: #2d2d5e !important;
    color: #fff !important;
}

.digijobs-btn:disabled {
    opacity: .65;
    cursor: not-allowed !important;
}

.digijobs-btn .btn-loader {
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .digijobs-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }
    .digijobs-field {
        margin-bottom: 16px;
    }
    .digijobs-form-header h2 {
        font-size: 22px;
    }
}
