/**
 * Job Source Sync - Application Styles
 * Styles for job application forms and components
 */

/* Application Container */
.jss-application-container {
    margin: 20px 0;
}

.jss-application-form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.jss-application-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.jss-application-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.jss-source-info {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Form Layout */
.jss-application-form {
    width: 100%;
}

.jss-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.jss-form-row .jss-form-group {
    flex: 1;
}

.jss-form-group {
    margin-bottom: 20px;
}

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

.jss-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.jss-form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.jss-form-control.jss-field-error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.jss-form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Checkbox Styling */
.jss-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.jss-form-checkbox {
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.jss-checkbox-text {
    color: #333;
}

/* Buttons */
.jss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    position: relative;
}

.jss-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.jss-btn-primary {
    background: #0073aa;
    color: #fff;
}

.jss-btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.jss-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.jss-btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
    border-color: #ccc;
}

.jss-btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.jss-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: jss-spin 1s linear infinite;
}

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

/* Form Actions */
.jss-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

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

.jss-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.jss-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jss-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Field Error Messages */
.jss-field-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* External Application */
.jss-external-application {
    text-align: center;
    padding: 40px 20px;
}

.jss-external-info {
    margin-bottom: 30px;
}

.jss-external-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 16px;
}

.jss-external-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal Styles */
.jss-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.jss-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.jss-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
    background: #f9f9f9;
}

.jss-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.jss-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.jss-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.jss-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Apply Button Styles */
.jss-apply-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 44px;
}

.jss-apply-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    text-decoration: none;
    color: #fff;
}

.jss-apply-btn.jss-external-link {
    background: #28a745;
}

.jss-apply-btn.jss-external-link:hover {
    background: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .jss-application-form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .jss-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .jss-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .jss-btn {
        width: 100%;
        justify-content: center;
    }
    
    .jss-modal {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .jss-modal-header,
    .jss-modal-body {
        padding: 15px;
    }
    
    .jss-external-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .jss-application-header h3 {
        font-size: 20px;
    }
    
    .jss-form-control {
        padding: 10px 12px;
    }
    
    .jss-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .jss-application-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .jss-form-actions,
    .jss-modal-overlay {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .jss-form-control {
        border-width: 3px;
    }
    
    .jss-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .jss-btn,
    .jss-form-control,
    .jss-modal-overlay {
        transition: none;
    }
    
    .jss-spinner {
        animation: none;
    }
}
