/**
 * CSA Job Apply System Styles
 * Modal and form styling for the job application system
 */

/* Modal Styles */
.csa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* ========================= */
/* BACKGROUND LOCK */
/* ========================= */
body.csa-modal-open {
    overflow: hidden;
}
/* Prevent clicks behind modal */
body.csa-modal-open #csa-job-detail {
    pointer-events: none;
}
/* Allow modal interaction */
#csa-apply-modal {
    pointer-events: auto;
}

.csa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    inset: 0;
    z-index: 999998;
}

/* Modal content above overlay */
.csa-modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 999999;
}

.csa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.csa-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.csa-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    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.2s;
}

.csa-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.csa-modal-body {
    padding: 15px 20px 15px;
}

/* Form Styles */
.csa-apply-form {
    max-width: none;
}

.csa-form-field {
    color: black;
}

.csa-form-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.csa-form-field .required {
    color: #d32f2f;
}

.csa-form-field input[type="text"],
.csa-form-field input[type="tel"],
.csa-form-field input[type="email"],
.csa-form-field input[type="date"],
.csa-form-field select,
.csa-form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.csa-form-field input:focus,
.csa-form-field select:focus,
.csa-form-field textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

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

.csa-form-field select {
    /* background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); */
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    padding-right: 40px;
}

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

.csa-submit-btn,
.csa-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.csa-submit-btn {
    background: #007cba;
    color: white;
}

.csa-submit-btn:hover:not(:disabled) {
    background: #005a87;
}

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

.csa-cancel-btn {
    background: #f0f0f0;
    color: #333;
}

.csa-cancel-btn:hover {
    background: #e0e0e0;
}

/* Apply Button */
.csa-apply-btn {
    background: #2557a7;
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 120px;
    position: relative;
}

.csa-apply-btn:hover {
    background: #164081;
}

.csa-apply-btn:disabled {
    background: #2557a7;
    cursor: not-allowed;
    opacity: 0.8;
}


/* Loading and Messages */
.csa-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.csa-loading p {
    margin: 0;
    font-size: 16px;
}

.csa-modal-body {
    position: relative;
}

.csa-modal-body.csa-modal-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    z-index: 10;
    pointer-events: all;
}

.csa-action-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.csa-action-button.csa-button-loading {
    cursor: default;
    opacity: 0.9;
}

.btn-text {
    display: inline;
}

.btn-text.csa-hidden {
    display: none !important;
}

.csa-button-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease;
}

.csa-button-content.csa-hidden {
    visibility: hidden !important; /* preserves button size during loading */
}

.csa-apply-btn {
    position: relative; /* Enable absolute positioning for spinner */
}

.csa-button-spinner {
    display: none !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.csa-button-spinner.csa-visible {
    display: flex !important;
    align-items: center;
    justify-content: center;
}


.csa-button-spinner .spinner {
    height: 16px;
    width: 16px;
    border: 2px solid;
    border-color: currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rotate 0.6s linear infinite;
}


/* Modal Overlay Loader */
.csa-loading.client-loader {
    background: rgba(255, 255, 255, 0.8);
    color: #666666;
    position: absolute; /* use absolute inside modal */
    inset: 0;
    z-index: 2000;

    display: none;

    /* Center loader */
    align-items: center;
    justify-content: center;
    flex-direction: column;

    text-align: center;
}

/* Spinner Animation */
.spinner {
    margin: 0 auto;
    height: 120px;
    width: 120px;
    animation: rotate 0.8s infinite linear;
    border: 5px solid grey;
    border-right-color: transparent;
    border-radius: 50%;
}

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

.csa-success {
    text-align: center;
    padding: 40px;
    color: #28a745;
}

.csa-success p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.csa-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

/* Field Errors */
.csa-field-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csa-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .csa-modal-header {
        padding: 15px;
    }

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

    .csa-modal-body {
        padding: 15px;
    }

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

    .csa-submit-btn,
    .csa-cancel-btn {
        width: 100%;
    }
}






/* .csa-consent-wrapper {
    background: #f1f1f1;
    padding: 12px 14px;
    border-radius: 4px;
} */

.csa-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.csa-consent-label input[type="checkbox"] {
    margin-top: 3px;
}

.csa-consent-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 400;
}

.csa-consent-text strong {
    font-weight: 600;
}

.csa-consent-text a {
    color: #0073aa;
    text-decoration: underline;
}


.csa-section-heading :is(h1, h2, h3, h4, h5, h6) {
    font-size: 18px;
    font-weight: 600;
    /* margin: 20px 0 10px; */
    /* padding-bottom: 5px; */
    /* border-bottom: 1px solid #ddd; */
    color: #222;
    /* text-transform: uppercase; */
}


.csa-section-heading ul {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.csa-form-field p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.csa-form-field a {
    color: #0a66c2;
    text-decoration: underline;
}

.csa-form-field b {
    font-weight: 600;
}



.csa-form-field h1,
.csa-form-field h2,
.csa-form-field h3,
.csa-form-field h4,
.csa-form-field h5,
.csa-form-field h6 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.csa-file-upload {
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 18px;
    background: #ffffff;
}

.csa-file-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.csa-file-icon img {
    width: 28px;
    height: 28px;
}

.csa-file-content {
    flex: 1;
}

.csa-file-title {
    font-size: 14px;
    font-weight: 500;
    /* margin-bottom: 6px; */
    color: #131e24;
}

.csa-required {
    color: red;
}

.csa-file-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csa-file-btn {
    background: #fff;
    border: 1px solid #333;
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
    background-color: #f5f5f5;
}

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

.csa-file-name {
    font-size: 14px;
    color: #555;
}

.csa-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    /* margin-top: 5px; */
}


/* Submit and Continue */
#csa-next-step {
    background: #003da5;
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 105px;
    min-height: 42px;
}

#csa-next-step:hover {
    background: #164081;
}

/* Submit and Continue */
#csa-submit-btn {
    background: #003da5;
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 93px;
    min-height: 41px;
}

#csa-submit-btn:hover {
    background: #164081;
}


/* Previous */
#csa-prev-step {
    background: #003da5;
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#csa-prev-step:hover {
    background: #164081;
}



.csa-review-card{
    background:#fff;
    border-radius:6px;
    border:1px solid #ddd;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}

.csa-review-row{
    padding:5px;
    border-bottom:1px solid #eee;
}

.csa-review-label{
    font-size:13px;
    color:#777;
}

.csa-review-value{
    font-size:16px;
    font-weight:600;
    color: #222;
}



.csa-review-title{
    font-size:21px;
    font-weight:600;
    margin-bottom:15px;
    margin-top: 4px;
}

.csa-review-section{
    margin-bottom:25px;
}

.csa-review-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.csa-review-row{
    padding:5px;
    border-bottom:1px solid #eee;
}

.csa-review-row:last-child{
    border-bottom:none;
}

.csa-review-label{
    font-size:13px;
    color:#777;
}

.csa-review-value{
    font-size:16px;
    font-weight:600;
}

.csa-submit-btn{
    background:#003da5;
    color:#fff;
    border:none;
    padding:12px 25px;
    border-radius:2px;
    font-size:16px;
    min-width: 93px;
    min-height: 41px;
    
}


.csa-review-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #6f6f6f;
    margin: 0px;
}

.csa-review-header a {
    font-size: 18px;
    font-weight: 600;
    color: #2557a7;
    text-decoration: none;
}

.edit-step:hover {
    text-decoration: underline;
    color: #2557a7;
}

.csa-review-group-title {
    font-size: .875rem;
    font-weight: 800;
    color: #595959;
    margin: 15px 0 10px;
    line-height: 1.43;
}

.csa-review-group-title :is(h1, h2, h3, h4, h5, h6) {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.csa-review-group-title h3 a {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.csa-review-group-title a {
    font-size: 18px;
    font-weight: 600;
    color: #2557a7;
    text-decoration: none;
}

.csa-review-row a {
    color: #2557a7;
    text-decoration: none;
}

.csa-review-row a:hover{
    color: #164081;
    text-decoration: underline;
}

/* .fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear;}
.fa-spinner:before{content:"\f110";} */

/* .spinner {
  width:18px;
  height:18px;
  border:3px solid #ccc;
  border-top:3px solid #333;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

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


.csa-return-btn{
    background:#2f5aa8;
    color:white;
    border:none;
    padding:12px 28px;
    border-radius:6px;
    font-size:16px;
    margin-top:20px;
    cursor:pointer;
    font-weight: 600;
}

.csa-return-btn:hover{
    background:#244a8a;
}
.dot {display: inline-block;animation-name: bouncing;animation-duration: 700ms;animation-iteration-count: infinite;animation-timing-function: ease-out;&:nth-child(2) {  animation-delay: 125ms;}&:nth-child(3) {  animation-delay: 250ms;}}
@keyframes bouncing {0% {transform: none;}33% {transform: translateY(-.5em);}66% {transform: none;}}
@keyframes bouncing {0% {transform: none;}33% {transform: translateY(-.5em);}66% {transform: none;}}

.csa-radio-input {
  cursor: pointer;
}

.job-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}
