/**
 * Frontend Styles
 * Recruitment Pro
 */

/* Application Form */
.rp-application-form-wrapper {
    max-width: 700px;
    margin: 30px auto;
}

.rp-custom-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

/* Form Fields */
.rp-form-field {
    margin-bottom: 25px;
}

.rp-form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.rp-form-field .required {
    color: #d63638;
}

.rp-input,
.rp-textarea,
.rp-select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.rp-input:focus,
.rp-textarea:focus,
.rp-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.rp-textarea {
    resize: vertical;
    font-family: inherit;
}

.rp-field-description {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
}

/* Checkbox */
.rp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.rp-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* File Upload */
.rp-file-input {
    padding: 10px;
    background: #f6f7f7;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.rp-file-input:hover {
    border-color: #2271b1;
    background: #e7f5fe;
}

/* Repeater */
.rp-repeater-wrapper {
    margin: 20px 0;
}

.rp-repeater-items {
    margin-bottom: 15px;
}

.rp-repeater-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.rp-repeater-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.rp-repeater-item-header strong {
    font-size: 15px;
    color: #2271b1;
}

.rp-repeater-remove {
    background: #d63638;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.rp-repeater-remove:hover {
    background: #b32d2e;
}

.rp-repeater-remove .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.rp-repeater-item-fields {
    display: grid;
    gap: 15px;
}

.rp-repeater-subfield {
    display: flex;
    flex-direction: column;
}

.rp-repeater-subfield label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #555;
}

.rp-repeater-add {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.rp-repeater-add:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rp-repeater-add .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.rp-repeater-add:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Actions */
.rp-form-actions {
    margin-top: 30px;
    text-align: center;
}

.rp-submit-btn {
    background: linear-gradient(90deg, #43485f 0%, #3079c8 100%);
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.rp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.rp-form-messages {
    margin-top: 20px;
}

.rp-form-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.rp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rp-form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Responsive */
@media (max-width: 768px) {
    .rp-custom-form {
        padding: 20px;
    }
    
    .rp-repeater-item {
        padding: 15px;
    }
    
    .rp-submit-btn {
        width: 100%;
        padding: 15px 20px;
    }
}

/* Loading State */
.rp-form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.rp-form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: rp-spin 1s linear infinite;
}

@keyframes rp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Vacancy Form ─────────────────────────────── */
.rp-vacancy-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.rp-vacancy-banner {
    background: linear-gradient(90deg, #43485f 0%, #3079c8 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 18px 24px;
    margin-bottom: 0;
}

.rp-vacancy-banner-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-vacancy-banner-title .dashicons {
    font-size: 20px;
}

.rp-vacancy-banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.rp-vmeta-tag {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
}

.rp-vacancy-form {
    border: 2px solid #764ba2;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 24px;
    background: #fff;
}

.rp-vacancy-submit-btn {
    background: linear-gradient(90deg, #43485f 0%, #3079c8 100%);
    border: none !important;
    color: #fff !important;
    font-size: 16px !important;
    padding: 14px 32px !important;
    border-radius: 6px !important;
    cursor: pointer;
    width: 100%;
    transition: opacity .2s;
}

.rp-vacancy-submit-btn:hover {
    opacity: .9;
}
