/* =============================================
   Candidate Details Form – Frontend Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:wght@700&display=swap');

.cdf-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 48px 44px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.08);
    font-family: 'DM Sans', sans-serif;
}

.cdf-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.cdf-subheading {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 36px;
    line-height: 1.6;
}

/* Message box */
.cdf-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.93rem;
    margin-bottom: 24px;
    font-weight: 500;
}
.cdf-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.cdf-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Grid */
.cdf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 28px;
}

.cdf-col {
    display: flex;
    flex-direction: column;
}

.cdf-col-full {
    grid-column: 1 / -1;
}

/* Labels */
.cdf-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cdf-label span {
    color: #ef4444;
    margin-left: 2px;
}

/* Inputs */
.cdf-input,
.cdf-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.94rem;
    font-family: 'DM Sans', sans-serif;
    color: #111827;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

.cdf-input:focus,
.cdf-textarea:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.cdf-input::placeholder,
.cdf-textarea::placeholder {
    color: #9ca3af;
}

.cdf-textarea {
    resize: vertical;
    min-height: 110px;
}

/* Radio group */
.cdf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cdf-radio-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.93rem;
    color: #374151;
    cursor: pointer;
    flex-wrap: wrap;
}

.cdf-radio-label input[type="radio"] {
    accent-color: #4f46e5;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cdf-other-input {
    width: 160px !important;
    padding: 7px 10px !important;
    font-size: 0.88rem !important;
}

.cdf-other-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* File upload */
.cdf-upload-wrap {
    position: relative;
}

.cdf-upload-wrap input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.cdf-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: #f3f4f6;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 500;
    color: #374151;
    transition: background 0.2s, border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.cdf-upload-btn:hover {
    background: #e0e7ff;
    border-color: #4f46e5;
    color: #4f46e5;
}

.cdf-upload-btn.file-selected {
    background: #ecfdf5;
    border-color: #34d399;
    color: #065f46;
}

/* Submit */
.cdf-submit-wrap {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
}

.cdf-submit-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border: none;
    padding: 13px 38px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(79,70,229,0.35);
}

.cdf-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(79,70,229,0.45);
}

.cdf-submit-btn:active {
    transform: translateY(0);
}

.cdf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 640px) {
    .cdf-container {
        padding: 28px 20px;
        margin: 20px 16px;
    }
    .cdf-row {
        grid-template-columns: 1fr;
    }
    .cdf-col-full {
        grid-column: 1;
    }
}
