/**
 * Custom Careers Form Styles - Dark Theme Match
 */

.custom-careers-form-wrapper {
    width: 100%;
    margin: 20px 0 26px 0;
}

.custom-careers-form {
    background: transparent;
    width: 100%;
}

.custom-careers-form * {
    word-break: break-word;
    box-sizing: border-box;
}

.form-row {
    margin-bottom: 20px;
}

.form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-third {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 400;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.3;
}

.form-field .required {
    color: #ff0000;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea,
.form-field select {
    background-color: #4a4a4a;
    border: 1px solid #666666;
    border-radius: 3px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    padding: 11px 14px;
    width: 100%;
    line-height: 1.3;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="tel"]:focus,
.form-field textarea:focus,
.form-field select:focus {
    background-color: #4a4a4a;
    border-color: #888888;
    outline: 0;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

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

.field-description {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.6);
}

/* File Upload - Dropzone styling to match dark theme */
.form-field .resume-dropzone-area,
.form-field .custom-dropzone {
    background-color: #4a4a4a;
    border: 2px dashed #666666;
    border-radius: 3px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
    min-height: 150px;
}

.form-field .resume-dropzone-area:hover,
.form-field .custom-dropzone:hover,
.form-field .custom-dropzone.dz-drag-hover {
    border-color: #888888;
    background-color: #555555;
}

.form-field .resume-dropzone-area .dz-message,
.form-field .custom-dropzone .dz-message {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
    font-weight: 400;
}

.form-field .custom-dropzone .dz-message .dz-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
    color: #ffffff;
}

.form-field .custom-dropzone .dz-message .modern-hint {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.6);
}

.form-field .custom-dropzone .dz-preview {
    margin: 15px 0 0 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 50px 1fr auto;
    grid-template-areas:
        "icon details remove";
    gap: 15px;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    padding: 15px;
}

.form-field .custom-dropzone .dz-preview .dz-image {
    grid-area: icon;
    width: 50px;
    height: 50px;
    border-radius: 3px;
    border: 2px solid #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #5a5a5a;
    overflow: hidden;
    position: relative;
}

.form-field .custom-dropzone .dz-preview .dz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Add document icon for non-image files */
.form-field .custom-dropzone .dz-preview .dz-image:before {
    content: "📄";
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.form-field .custom-dropzone .dz-preview .dz-image img {
    position: relative;
    z-index: 1;
}

.form-field .custom-dropzone .dz-preview .dz-details {
    grid-area: details;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
    min-width: 0;
    position: static !important;
    opacity: 1 !important;
    align-items: flex-start;
}

.form-field .custom-dropzone .dz-preview .dz-filename {
    font-size: 14px;
    color: #ffffff;
    order: 2;
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
}

.form-field .custom-dropzone .dz-preview .dz-filename span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-field .custom-dropzone .dz-preview .dz-size {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    order: 1;
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    text-align: left !important;
}

.form-field .custom-dropzone .dz-preview .dz-size strong {
    font-weight: normal;
}

.form-field .custom-dropzone .dz-preview .dz-remove {
    grid-area: remove;
    font-size: 13px;
    color: #ff6666;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #ff6666;
    background: transparent;
    padding: 6px 12px;
    border-radius: 3px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.form-field .custom-dropzone .dz-preview .dz-remove:hover {
    background-color: #ff6666;
    color: #ffffff;
}

/* Hide progress bar and other unwanted elements */
.form-field .custom-dropzone .dz-preview .dz-progress {
    display: none !important;
}

.form-field .custom-dropzone .dz-preview .dz-upload {
    display: none !important;
}

.form-field .custom-dropzone .dz-preview.dz-error .dz-image {
    border-color: #ff0000;
}

.form-field .custom-dropzone .dz-preview .dz-error-message {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #ff6666;
}

.form-field .custom-dropzone .dz-preview .dz-success-mark,
.form-field .custom-dropzone .dz-preview .dz-error-mark {
    display: none;
}

.form-field .custom-dropzone.error-highlight {
    border-color: #ff0000;
}

.careers-submit-btn {
    background-color: #066aab;
    border: 0;
    border-radius: 3px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 15px 30px;
    text-align: center;
    width: auto;
    transition: background-color 0.15s ease-in-out;
}

.careers-submit-btn:hover {
    background-color: #0558a5;
}

.careers-submit-btn:disabled {
    background-color: rgba(0, 0, 0, 0.25);
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
}

.form-response {
    padding: 15px 20px;
    border-radius: 3px;
    margin-bottom: 20px;
    font-size: 15px;
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.form-response.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.form-response.error {
    color: #D63637;
    background-color: #f2dede;
    border-color: #f2dede;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .form-row-half,
    .form-row-third {
        grid-template-columns: 1fr;
    }

    .careers-submit-btn {
        width: 100%;
    }

    .form-field .dropzone {
        padding: 30px 15px;
        min-height: 120px;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loader::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
