/* =============================================
   Website Modal Styles
   Matches the M3Tech website theme
   ============================================= */

/* Base Modal Backdrop */
.ws-modal.modal-backdrop {
    background-color: rgba(43, 46, 55, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Dialog */
.ws-modal-dialog {
    max-width: 720px;
    margin: 1.75rem auto;
}

.ws-modal-dialog.modal-lg {
    max-width: 800px;
}

.ws-modal-dialog.modal-xl {
    max-width: 960px;
}

.ws-modal-dialog.modal-sm {
    max-width: 400px;
}

/* Modal Content */
.ws-modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Modal Header */
.ws-modal-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, rgba(241, 110, 42, 0.03) 0%, rgba(249, 165, 52, 0.03) 100%);
}

.ws-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2b2e37;
    line-height: 1.4;
    margin: 0;
    padding-right: 16px;
}

.ws-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.5;
}

.ws-modal-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Modal Body */
.ws-modal-body {
    padding: 24px 28px 28px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Scrollbar Styling */
.ws-modal-body::-webkit-scrollbar {
    width: 6px;
}

.ws-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.ws-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.ws-modal-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

/* =============================================
   Job Details Modal Styles
   ============================================= */

.ws-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ws-tag-dept {
    background: linear-gradient(135deg, #f16e2a, #f9a534);
    color: #fff;
}

.ws-tag-location,
.ws-tag-type,
.ws-tag-exp {
    background-color: #f4f4f9;
    color: #555;
}

.ws-job-section {
    margin-bottom: 24px;
}

.ws-job-section:last-of-type {
    margin-bottom: 0;
}

.ws-job-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #2b2e37;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f16e2a;
    display: inline-block;
}

.ws-job-section-content {
    font-family: 'Rubik', sans-serif;
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.ws-job-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ws-job-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.ws-job-bullet {
    color: #f16e2a;
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 0.8rem;
}

.ws-job-apply {
    text-align: center;
    border-color: #f0f0f0 !important;
}

/* =============================================
   Application Form Styles
   ============================================= */
.ws-form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1a1a1a;               /* ensure typed text is visible */
  background-color: #ffffff;    /* ensure background isn't transparent/dark */
  background-clip: padding-box;
  border: 1px solid #ced4da;    /* default border */
  border-radius: 6px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
}

.ws-form-control::placeholder {
  color: #6c757d;               /* visible gray placeholder */
  opacity: 1;                   /* Firefox lowers opacity by default */
}

.ws-form-control:focus {
  color: #1a1a1a;               /* keep text visible on focus */
  background-color: #ffffff;
  border-color: #f97316;        /* or your brand color, instead of default black */
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.ws-form-control:disabled,
.ws-form-control[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
  opacity: 1;
}

.ws-form-control {
    border: 1px solid #e4e6ef;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'Rubik', sans-serif;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafbfc;
}

.ws-form-control:focus {
    border-color: #f16e2a;
    box-shadow: 0 0 0 3px rgba(241, 110, 42, 0.1);
    background-color: #fff;
}

.ws-apply-form-wrap .form-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    color: #353f4f;
    margin-bottom: 6px;
}

/* Form Groups - consistent vertical layout */
.ws-apply-form-wrap .row {
    --bs-gutter-y: 1.15rem;
}

.ws-form-group {
    width: 100%;
}

.ws-form-group .form-control {
    width: 100%;
    min-height: 44px;
}

.ws-form-group .ws-file-input {
    padding: 7px 12px;
}

.ws-form-group .ws-file-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
}

.ws-form-group .ws-validation-error {
    display: none;
    width: 100%;
    color: #dc3545;
    font-family: 'Rubik', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-top: 5px;
}

.ws-form-group .ws-validation-error.show {
    display: block;
}

.ws-form-group.has-error .form-control {
    border-color: #dc3545;
}

.ws-form-group.has-error .form-control:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.ws-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 6px;
}

.ws-form-actions .btn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    padding: 10px 22px;
    min-height: 42px;
}

.ws-form-actions .ws-btn-cancel {
    border: 1px solid #e4e6ef;
    color: #5a6270;
    background-color: transparent;
}

.ws-form-actions .ws-btn-cancel:hover {
    background-color: #f4f4f9;
    color: #2b2e37;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    .ws-modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1rem);
    }

    .ws-modal-header {
        padding: 16px 20px 12px;
    }

    .ws-modal-title {
        font-size: 1.1rem;
    }

    .ws-modal-body {
        padding: 20px;
        max-height: calc(90vh - 70px);
    }

    .ws-job-tags {
        gap: 6px;
    }

    .ws-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .ws-job-apply .btn {
        width: 100%;
    }

    .ws-apply-form-wrap .row {
        --bs-gutter-y: 1.05rem;
    }

    .ws-form-actions {
        flex-wrap: wrap;
    }

    .ws-form-actions .btn {
        flex: 1 1 auto;
    }

    .ws-form-actions .ws-btn-cancel {
        flex-grow: 0;
    }
}

@media (max-width: 480px) {
    .ws-modal-dialog {
        margin: 0.5rem;
    }

    .ws-modal-body {
        padding: 16px;
    }

    .ws-job-section-title {
        font-size: 0.9375rem;
    }

    .ws-job-section-content {
        font-size: 0.875rem;
    }

    .ws-form-actions {
        justify-content: stretch;
    }

    .ws-form-actions .btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .ws-modal-dialog {
        margin: 0.5rem;
    }

    .ws-modal-body {
        padding: 16px;
    }

    .ws-job-section-title {
        font-size: 0.9375rem;
    }

    .ws-job-section-content {
        font-size: 0.875rem;
    }
}
