/* Form Styles for Quality Care Resourcing UK */

/* Page Header */
.page-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.header-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

/* Job Opportunities */
.job-opportunities {
    padding: 80px 0;
}

.job-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.filter-select:hover {
    border-color: var(--gold-color);
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.job-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-color);
}

.job-header {
    margin-bottom: 1.5rem;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.job-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.job-type {
    display: inline-block;
    background: var(--gold-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.job-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.job-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.job-detail i {
    color: var(--gold-color);
}

.job-actions {
    display: flex;
    gap: 1rem;
}

.btn-apply {
    flex: 1;
    background: var(--gradient-gold);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-save {
    background: var(--white);
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: var(--gold-color);
    color: var(--primary-color);
}

/* Form Styles */
.application-form-section {
    background: var(--light-bg);
    padding: 80px 0;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.application-form {
    padding: 3rem;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--gold-color);
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload Styles */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--light-bg);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload:hover .file-upload-text {
    border-color: var(--gold-color);
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold-color);
}

.file-upload-text i {
    font-size: 1.5rem;
}

/* Checkbox Styles */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: var(--text-primary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--gold-color);
    border-color: var(--gold-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Error Styles */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--danger-color);
}

.field-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.benefit-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gold-color);
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification-info { border-left-color: var(--gold-color); }
.notification-success { border-left-color: var(--success-color); }
.notification-warning { border-left-color: var(--warning-color); }
.notification-error { border-left-color: var(--danger-color); }

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.notification-message {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    color: var(--text-primary);
    background: var(--light-bg);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .job-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .application-form {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .application-form {
        padding: 1.5rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .form-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .file-upload-text {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* UK Legal Requirements Styling */
.required-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: block;
}

.required-label::after {
    content: " *";
    color: #dc2626;
}

/* Radio Button Styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.radio-label:hover {
    border-color: #7c3aed;
    background: #faf7ff;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #7c3aed;
    background: #7c3aed;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-label input[type="radio"]:checked ~ span:not(.radio-custom) {
    color: #7c3aed;
    font-weight: 500;
}

/* Enhanced Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
    margin-bottom: 8px;
}

.checkbox-label:hover {
    border-color: #7c3aed;
    background: #faf7ff;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    border-color: #7c3aed;
    background: #7c3aed;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.checkbox-label input[type="checkbox"]:checked ~ span:not(.checkmark) {
    color: #7c3aed;
    font-weight: 500;
}

/* Section with icon styling */
.form-section h3 i {
    margin-right: 8px;
    color: #7c3aed;
}

/* Equality info text */
.form-section p {
    line-height: 1.6;
}

/* GDPR Compliance Styling */
.gdpr-consent-section {
    background: #fef7ff;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.gdpr-consent-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.optional-consent-section {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.optional-consent-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdpr-rights-notice, .legal-basis-notice {
    font-size: 13px;
    margin-top: 20px;
}

.gdpr-rights-notice h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Enhanced checkbox styling for GDPR compliance */
.checkbox-label.mandatory {
    font-weight: 500;
}

.checkbox-label.optional {
    color: #6b7280;
}

/* Mandatory field indicators */
.mandatory .checkmark {
    border-color: #dc2626;
}

.mandatory input:checked ~ .checkmark {
    background-color: #dc2626;
    border-color: #dc2626;
}

.mandatory:hover input ~ .checkmark {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Optional field indicators */
.optional .checkmark {
    border-color: #059669;
}

.optional input:checked ~ .checkmark {
    background-color: #059669;
    border-color: #059669;
}

.optional:hover input ~ .checkmark {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Links within consent text */
.checkbox-label a, .gdpr-rights-notice a {
    color: #7c3aed;
    text-decoration: underline;
    font-weight: 500;
}

.checkbox-label a:hover, .gdpr-rights-notice a:hover {
    color: #5b21b6;
    text-decoration: none;
}

/* Responsive adjustments for legal requirements */
@media (max-width: 768px) {
    .radio-group,
    .checkbox-group {
        gap: 8px;
    }
    
    .radio-label,
    .checkbox-label {
        padding: 10px;
        font-size: 14px;
    }
    
    .radio-custom,
    .checkmark {
        width: 18px;
        height: 18px;
    }

    .gdpr-consent-section, .optional-consent-section {
        padding: 15px;
    }
    
    .checkbox-label, .radio-label {
        font-size: 13px;
    }
    
    .gdpr-rights-notice, .legal-basis-notice {
        padding: 15px;
        font-size: 12px;
    }
}
