
/* Required asterisk */
.required {
  color: #dc3545;
  font-weight: bold;
}

/* Upload error state */
.apply-form__upload-box.error,
.file-upload-label.error {
  border-color: #dc3545 !important;
  background: #fff5f5 !important;
}

/* Input error state */
.apply-form__input.error,
.apply-form__select.error {
  border-color: #dc3545;
  background: #fff5f5;
}

/* Modal Overlay */
.modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
z-index: 9998;
animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
display: block;
}

@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

/* Modal Container */
.application-modal {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 600px;
max-height: 90vh;
background: #fff;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
z-index: 9999;
overflow: hidden;
animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.application-modal.active {
display: block;
}

@keyframes slideUp {
from {
opacity: 0;
transform: translate(-50%, -45%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}

/* Modal Header */
.modal-header {
background: linear-gradient(135deg, #b38865 0%, #c9976f 100%);
color: #fff;
padding: 24px 28px;
position: relative;
}

.modal-header h2 {
margin: 0;
font-size: 24px;
font-weight: 600;
letter-spacing: 0.3px;
}

.modal-header .job-info {
margin-top: 8px;
font-size: 14px;
opacity: 0.95;
}

.modal-close {
position: absolute;
top: 20px;
right: 20px;
background: rgba(255, 255, 255, 0.2);
border: none;
color: #fff;
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
font-size: 24px;
line-height: 1;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}

.modal-close:hover {
background: rgba(255, 255, 255, 0.3);
transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
padding: 28px;
max-height: calc(90vh - 160px);
overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
width: 8px;
}

.modal-body::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
background: #b38865;
border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
background: #9d7555;
}

/* Form Styles */
.application-form {
display: flex;
flex-direction: column;
gap: 20px;
}

.form-group {
display: flex;
flex-direction: column;
gap: 8px;
}

.form-group label {
font-weight: 600;
color: #333;
font-size: 14px;
display: flex;
align-items: center;
gap: 4px;
}

.form-group label .required {
color: #d32f2f;
font-size: 16px;
}

.form-input,
.form-select,
.form-textarea {
padding: 12px 16px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 15px;
font-family: inherit;
transition: all 0.3s ease;
background: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
outline: none;
border-color: #b38865;
box-shadow: 0 0 0 3px rgba(179, 136, 101, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
color: #999;
}

.form-textarea {
min-height: 100px;
resize: vertical;
}

/* File Upload */
.file-upload-wrapper {
position: relative;
}

.file-upload-input {
display: none;
}

.file-upload-label {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 16px;
border: 2px dashed #b38865;
border-radius: 8px;
background: #fafafa;
cursor: pointer;
transition: all 0.3s ease;
color: #666;
font-weight: 500;
}

.file-upload-label:hover {
background: #f5f5f5;
border-color: #9d7555;
}

.file-upload-label svg {
width: 24px;
height: 24px;
fill: #b38865;
}

.file-name {
margin-top: 8px;
font-size: 13px;
color: #666;
font-style: italic;
}

.file-name.has-file {
color: #2e7d32;
font-weight: 500;
}

.file-info {
margin-top: 8px;
font-size: 12px;
color: #999;
}

/* Form Row (2 columns) */
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}

/* Buttons */
.form-actions {
display: flex;
gap: 12px;
margin-top: 12px;
padding-top: 20px;
border-top: 1px solid #e0e0e0;
}

.btn {
flex: 1;
padding: 14px 24px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}

.btn-submit {
background: linear-gradient(135deg, #b38865 0%, #c9976f 100%);
color: #fff;
box-shadow: 0 4px 12px rgba(179, 136, 101, 0.3);
}

.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(179, 136, 101, 0.4);
}

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

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

.btn-cancel {
background: #f5f5f5;
color: #666;
border: 2px solid #e0e0e0;
}

.btn-cancel:hover {
background: #eeeeee;
border-color: #d0d0d0;
}

/* Success Message */
.success-message {
display: none;
text-align: center;
padding: 40px 20px;
}

.success-message.active {
display: block;
}

.success-icon {
width: 80px;
height: 80px;
margin: 0 auto 20px;
background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
from { transform: scale(0); }
to { transform: scale(1); }
}

.success-icon svg {
width: 48px;
height: 48px;
fill: #fff;
}

.success-message h3 {
color: #333;
font-size: 24px;
margin-bottom: 12px;
}

.success-message p {
color: #666;
font-size: 16px;
line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
.application-modal {
width: 95%;
max-height: 95vh;
}

.modal-header {
padding: 20px;
}

.modal-header h2 {
font-size: 20px;
}

.modal-body {
padding: 20px;
}

.form-row {
grid-template-columns: 1fr;
}

.form-actions {
flex-direction: column;
}

.btn {
width: 100%;
}
}

/* Loading State */
.btn-submit.loading::after {
content: "";
width: 16px;
height: 16px;
border: 2px solid #fff;
border-top-color: transparent;
border-radius: 50%;
animation: spin 0.6s linear infinite;
margin-left: 8px;
}

@keyframes spin {
to { transform: rotate(360deg); }
}
