/* Edit Resume Form Styles */

/* Main Container */
.edit-resume-container {
    max-width: 1600px;
    /* margin: 20px auto;
    margin-top: 100px; */
}

/* Modal overflow prevention */
.modal {
    overflow-x: hidden !important;
}

.modal-content {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Dynamic description overflow prevention */
#dynamicDescription1 {
    overflow-x: hidden !important;
}

#dynamicDescription1.edit-form-open {
    overflow-x: hidden !important;
}

/* Section Titles */
.edit-resume-section-title {
    color: #D0003A;
    border-bottom: 2px solid #D0003A;
    padding-bottom: 8px;
    margin-bottom: 20px;
    padding-left: 0;
    margin-left: 0;
}

/* Card header alignment */
.edit-resume-card-header {
    padding-left: 0;
    margin-left: 0;
}

.edit-resume-card-header h3 {
    padding-left: 0;
    margin-left: 10px;
}





/* Form Sections */
.edit-resume-form-section {
    margin-bottom: 1.5rem;
    padding-left: 0;
    margin-left: 0;
    flex: 1;
}

/* Ensure the last form section stretches to fill remaining space */
.edit-resume-form-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}





/* Ensure consistent alignment between resume preview and edit form */
.edit-resume-container {
    padding-left: 0;
    margin-left: 0;
}

.edit-resume-card-body {
    padding-left: 0;
    padding-right: 0;
}

/* Fix topbar content positioning and centering */
#applyButtonContainer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Ensure buttons are properly centered */
#applyButtonContainer button {
    margin: 0 5px !important;
}

/* Mobile responsive for topbar */
@media (max-width: 768px) {
    #applyButtonContainer {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    #applyButtonContainer button {
        margin: 0 !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* Ensure the modal content is properly centered */
/* .modal-content {
    text-align: center !important;
} */

/* Ensure the title section is properly centered - but NOT resume content */
/* .modal-title {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
} */

/* Only center specific modal body elements, not all paragraphs */
/* .modal-body > h2:first-child,
.modal-body > p:first-child {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
} */

/* Ensure resume content is NOT affected by centering */
/* #dynamicInnerContent .whole-resume,
#dynamicInnerContent .whole-resume *,
#resumePreviewColumn .whole-resume,
#resumePreviewColumn .whole-resume * {
    text-align: left !important;
    margin-left: inherit !important;
    margin-right: inherit !important;
} */

/* Ensure proper spacing around the topbar */
#applyButtonContainer {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
}









/* Align form content with resume preview content */
.edit-resume-form-section .row {
    margin-left: 0;
    margin-right: 0;
}

.edit-resume-form-section .col-md-6,
.edit-resume-form-section .col-md-4 {
    padding-left: 0;
    padding-right: 15px;
}

/* Ensure the first column aligns with resume content */
.edit-resume-form-section .col-md-6:first-child,
.edit-resume-form-section .col-md-4:first-child {
    padding-left: 0;
}

/* Button section alignment */
.edit-resume-form-section .row:last-child {
    margin-bottom: 0;
}

/* Ensure consistent spacing between sections */
.edit-resume-form-section + .edit-resume-form-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Align section titles with resume content */
.edit-resume-section-title {
    padding-left: 0;
    margin-left: 0;
}

/* Form Groups */
.edit-resume-form-group {
    margin-bottom: 1rem;
    padding-left: 0;
    margin-left: 0;
}

/* Ensure form labels and inputs align properly */
.edit-resume-form-label {
    padding-left: 0;
    margin-left: 0;
    text-align: left;
}

.edit-resume-form-control {
    padding-left: 0;
    margin-left: 0;
}

/* Form Labels */
.edit-resume-form-label {
    font-weight: bold;
}

/* Form Controls */
.edit-resume-form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.edit-resume-form-control:focus {
    border-color: #D0003A;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(208, 0, 58, 0.25);
}

/* Validation Error Styles */
.edit-resume-form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.edit-resume-form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.field-error {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease-in;
}

.field-error i {
    color: #dc3545;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Textarea specific styles */
.edit-resume-textarea {
    resize: vertical;
    min-height: 137px;
}

/* Entry Containers (for work experience, education, etc.) */
.edit-resume-entry-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Buttons */
.edit-resume-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    min-height: 44px;
}

/* Mobile spacing for work experience buttons */
@media (max-width: 767.98px) {
    .edit-resume-entry-container .row .col-md-6:first-child {
        margin-bottom: 10px;
    }
    
    .edit-resume-entry-container .row .col-md-6 {
        margin-bottom: 10px;
    }
}



.edit-resume-btn {
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.edit-resume-btn-primary {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn-primary:hover {
    background: linear-gradient(90deg, #B00030, #A01040, #9A2069) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(208, 0, 58, 0.4) !important;
}

.edit-resume-btn-outline-primary {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn-outline-primary:hover {
    background: linear-gradient(90deg, #B00030, #A01040, #9A2069) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(208, 0, 58, 0.4) !important;
}

.edit-resume-btn-danger {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn-danger:hover {
    background: linear-gradient(90deg, #B00030, #A01040, #9A2069) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(208, 0, 58, 0.4) !important;
}

/* Active states for all button types */
.edit-resume-btn-primary:active,
.edit-resume-btn-outline-primary:active,
.edit-resume-btn-danger:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn-sm:hover {
    background: linear-gradient(90deg, #B00030, #A01040, #9A2069) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 12px rgba(208, 0, 58, 0.4) !important;
}

.edit-resume-btn-sm:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 5px rgba(208, 0, 58, 0.3) !important;
}

/* Submit button (Save Changes) specific styling */
.edit-resume-btn[type="submit"] {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 50px;
    min-width: 180px;
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}

.edit-resume-btn[type="submit"]:hover {
    background: linear-gradient(90deg, #B00030, #A01040, #9A2069) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(208, 0, 58, 0.4) !important;
}

.edit-resume-btn[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(208, 0, 58, 0.3) !important;
}

/* Work Experience specific button styles */
.add-work-duty-btn,
.edit-resume-remove-btn {
    min-width: 200px;
    width: 200px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Icons */
.edit-resume-icon {
    margin-right: 0.5rem;
}

/* Conditional rows */
.edit-resume-conditional-row {
    display: none;
}

.edit-resume-conditional-row.show {
    display: block;
}

/* Form text helper */
.edit-resume-form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Custom Success Modal Styles */
.success-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    min-width: 320px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.success-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
}

.success-modal-header .btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.success-modal-header .btn-close:hover {
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.success-modal-header .btn-close:active {
    transform: scale(0.95);
}

/* Ensure the X symbol is perfectly centered */
.success-modal-header .btn-close::before {
    content: '×';
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
}

/* Alternative centering method using CSS Grid for perfect centering */
.success-modal-header .btn-close {
    display: grid !important;
    place-items: center !important;
    position: relative;
}

.success-modal-header .btn-close::before {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
    position: static;
}

/* Ultimate centering method using CSS transforms for pixel-perfect centering */
.success-modal-header .btn-close {
    position: relative;
    overflow: hidden;
}

.success-modal-header .btn-close::before {
    content: '×';
    font-size: 1.5rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    display: block;
    line-height: 1;
    text-align: center;
    margin: 0;
}

/* Fallback centering for older browsers */
.success-modal-header .btn-close {
    text-align: center;
    line-height: 32px;
}

.success-modal-header .btn-close::before {
    content: '×';
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Most robust centering method using flexbox with precise positioning */
.success-modal-header .btn-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    overflow: visible;
}

.success-modal-header .btn-close::before {
    content: '×';
    font-size: 1.5rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

/* Ensure the X symbol is perfectly centered on all devices */
@media (max-width: 768px) {
    .success-modal-header .btn-close::before {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .success-modal-header .btn-close::before {
        font-size: 1.3rem;
    }
}

.success-modal-body {
    padding: 1.5rem;
}

.success-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .edit-resume-container {
        margin: 10px;
    }
    
    .edit-resume-entry-container {
        padding: 0.75rem;
    }
    
    /* Mobile edit form layout */
    #dynamicDescription1.edit-form-open {
        max-width: 100% !important;
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    #dynamicDescription1.edit-form-open #dynamicDescriptionRow {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    #dynamicDescription1.edit-form-open #resumePreviewColumn {
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }
    
    #dynamicDescription1.edit-form-open #editFormContent {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        min-height: auto !important;
        overflow-x: hidden;
    }
    
    /* Ensure modal doesn't overflow on mobile */
    .modal-body {
        padding: 15px;
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Modal container overflow prevention */
    .modal-dialog {
        max-width: 100vw;
        margin: 10px;
    }
    
    /* Dynamic description container */
    #dynamicDescription1 {
        max-width: 100% !important;
        overflow-x: hidden;
    }
    
    /* Mobile button adjustments */
    .edit-resume-btn {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    /* Mobile form adjustments */
    .edit-resume-form-section {
        margin-bottom: 1rem;
    }
    
    .edit-resume-entry-container {
        margin-bottom: 1rem;
    }
    
    /* Mobile modal overflow prevention */
    .modal {
        overflow-x: hidden;
    }
    
    .modal-content {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Mobile edit form container */
#editFormContent {
    overflow-x: hidden;
    max-width: 100%;
}

/* Mobile resume preview */
#resumePreviewColumn {
    overflow-x: hidden;
    max-width: 100%;
}



/* Robust responsive width control for optimized resume */
#resumePreviewColumn .whole-resume {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* When edit form is NOT open - center and constrain resume width */
#dynamicDescription1:not(.edit-form-open) #resumePreviewColumn .whole-resume {
    max-width: 800px !important;
    margin: 0 auto !important;
   /* padding: 20px !important; */
}

/* When edit form IS open - COMPLETELY INDEPENDENT styling - no interference with resume */
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume {
    max-width: 100% !important;
    padding: 15px !important;
    /* CRITICAL: Don't change any alignment - let original template handle it */
    margin: 0 !important;
    /* Ensure no centering is applied */
    text-align: inherit !important;
}

/* CRITICAL: Ensure resume content sections maintain their original template styling */
/* Don't override any template styling - let original template handle it */
/* #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .candidate-name,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .contact-info,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .profile-summary-section,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .skills-section,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .work-experience-section,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .education-section,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .certifications-section,
#dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume .projects-section {
    
    text-align: inherit !important;
    margin-left: inherit !important;
    margin-right: inherit !important;
}

 */



/* Ensure resume content doesn't overflow on any device */
#resumePreviewColumn .whole-resume * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* CRITICAL: Ensure edit form section is completely independent */
#editFormContent {
    /* Independent styling - no interference with resume */
    max-width: 100% !important;
    margin: 0 !important;
    /* Ensure it doesn't affect resume layout */
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure edit form content doesn't affect resume styling */
#editFormContent * {
    /* Independent styling for all edit form elements */
    box-sizing: border-box !important;
}

/* CRITICAL: Ensure two-column layout doesn't interfere with resume styling */
#dynamicDescriptionRow.edit-form-open {
    /* Two-column layout without affecting resume content */
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 20px !important;
}

/* Resume column - completely independent */
#dynamicDescriptionRow.edit-form-open #resumePreviewColumn {
    flex: 1 !important;
    /* Don't change resume content styling */
    min-width: 0 !important;
}

/* Edit form column - completely independent */
#dynamicDescriptionRow.edit-form-open #editFormContent {
    flex: 1 !important;
    /* Don't change edit form content styling */
    min-width: 0 !important;
    max-width: 500px !important;
}



/* Ensure proper spacing for resume content sections */
#resumePreviewColumn .whole-resume .candidate-name,
#resumePreviewColumn .whole-resume .contact-info,
#resumePreviewColumn .whole-resume .education-section,
#resumePreviewColumn .whole-resume .certifications-section,
#resumePreviewColumn .whole-resume .work-experience-section,
#resumePreviewColumn .whole-resume .skills-section,
#resumePreviewColumn .whole-resume .projects-section,
#resumePreviewColumn .whole-resume .profile-summary-section {
    margin-bottom: 15px !important;
    padding: 0 !important;
}

/* Ensure proper spacing for resume text content */


/* Ensure proper spacing for resume lists */
#resumePreviewColumn .whole-resume ul,
#resumePreviewColumn .whole-resume ol {
    padding-left: 20px !important;
    margin-bottom: 10px !important;
}

#resumePreviewColumn .whole-resume li {
    margin-bottom: 5px !important;
    line-height: 1.4 !important;
}

/* Mobile optimized resume responsive fixes */
@media (max-width: 768px) {
    /* When edit form is NOT open - mobile centering */
    #dynamicDescription1:not(.edit-form-open) #resumePreviewColumn .whole-resume {
      /*  max-width: 95% !important; */
      /*  margin: 0 auto !important; */
      /*  padding: 15px !important; */
    }
    
    /* When edit form IS open - mobile padding - COMPLETELY INDEPENDENT */
    #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume {
        max-width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
        /* CRITICAL: Don't change any alignment on mobile */
        text-align: inherit !important;
    }
    
    /* Ensure mobile resume sections maintain original template styling */
   /*  #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume * {
        text-align: inherit !important;
        margin-left: inherit !important;
        margin-right: inherit !important;
    }
     */
    .whole-resume {
        padding: 10px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #optimized-resume {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Override inline styles for mobile */
    .whole-resume[style*="padding: 20px 20px"] {
        padding: 10px !important;
    }
    
    .whole-resume[style*="margin: 0 auto"] {
        margin: 0 !important;
    }
    
    /* Ensure content doesn't overflow */
    .whole-resume * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Contact info mobile adjustments */
    .contact-info {
        width: 100% !important;
        padding: 0 !important;
    }
    
    .contact-info > div {
        min-width: auto !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 5px 10px !important;
    }
    
    /* Table responsive fixes */
    .contact-table {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .contact-table td {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}

/* Tablet responsive fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    /* When edit form is NOT open - tablet centering */
    #dynamicDescription1:not(.edit-form-open) #resumePreviewColumn .whole-resume {
        max-width: 85% !important;
        margin: 0 auto !important;
        padding: 18px !important;
    }
    
    /* When edit form IS open - tablet padding */
    #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume {
        max-width: 100% !important;
        padding: 12px !important;
        margin: 0 !important;
    }
}

/* Large desktop responsive fixes */
@media (min-width: 1025px) and (max-width: 1440px) {
    /* When edit form is NOT open - large desktop centering */
    #dynamicDescription1:not(.edit-form-open) #resumePreviewColumn .whole-resume {
        max-width: 900px !important;
        margin: 0 auto !important;
        padding: 20px !important;
    }
    
    /* When edit form IS open - large desktop padding */
    #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume {
        max-width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
    }
}

/* Extra large desktop responsive fixes */
@media (min-width: 1441px) {
    /* When edit form is NOT open - extra large desktop centering */
    #dynamicDescription1:not(.edit-form-open) #resumePreviewColumn .whole-resume {
        max-width: 1000px !important;
        margin: 0 auto !important;
        padding: 25px !important;
    }
    
    /* When edit form IS open - extra large desktop padding */
    #dynamicDescription1.edit-form-open #resumePreviewColumn .whole-resume {
        max-width: 100% !important;
        padding: 20px !important;
        margin: 0 !important;
    }
}

/* Quit Confirmation Modal Responsive Styles */
#quitConfirmationModal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 450px !important;
    min-width: 320px !important;
    padding: 20px !important;
    border-radius: 12px !important;
    background: white !important;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
}

/* Quit Modal Mobile Responsive */
@media (max-width: 768px) {
    #quitConfirmationModal {
        width: 95% !important;
        max-width: 95% !important;
        min-width: 280px !important;
        padding: 15px !important;
        margin: 10px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    #quitConfirmationModal p {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    
    #quitConfirmationModal .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    #quitConfirmationModal div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Quit Modal Small Mobile Responsive */
@media (max-width: 480px) {
    #quitConfirmationModal {
        width: 95% !important;
        max-width: 95% !important;
        min-width: 280px !important;
        padding: 15px !important;
        margin: 10px !important;
    }
    
    #quitConfirmationModal p {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    
    #quitConfirmationModal button {
        padding: 8px 12px !important;
        font-size: 13px !important;
        min-height: 38px !important;
        min-width: 120px !important;
    }
}

/* Quit Modal Extra Small Mobile Responsive */
@media (max-width: 360px) {
    #quitConfirmationModal {
        width: 92% !important;
        max-width: 92% !important;
        min-width: 260px !important;
        padding: 12px !important;
        margin: 8px !important;
    }
    
    #quitConfirmationModal p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    #quitConfirmationModal button {
        padding: 6px 10px !important;
        font-size: 12px !important;
        min-height: 36px !important;
        min-width: 100px !important;
    }
}

/* Quit Modal Landscape Mobile Responsive */
@media (max-width: 768px) and (orientation: landscape) {
    #quitConfirmationModal {
        max-height: 90vh !important;
        overflow-y: auto !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* Quit Modal Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    #quitConfirmationModal {
        width: 80% !important;
        max-width: 500px !important;
        padding: 18px !important;
    }
}

/* Quit Modal Button Hover Effects */
#quitConfirmationModal button:hover {
    transform: translateY(-1px) !important;
    transition: all 0.3s ease !important;
}

#quitConfirmationModal button:active {
    transform: translateY(0) !important;
}

/* Quit Modal Text Styling */
#quitConfirmationModal .quit-modal-text {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 20px !important;
    line-height: 1.5 !important;
}

/* Quit Modal Buttons Container */
#quitConfirmationModal .quit-modal-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 16px !important;
}

/* Quit Modal Button Base Styles */
#quitConfirmationModal .quit-modal-btn {
    padding: 10px 16px !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important;
}

/* Continue Application Button */
#quitConfirmationModal .quit-modal-btn-continue {
    background: transparent !important;
    color: #D0003A !important;
    border: 1px solid #D0003A !important;
}

#quitConfirmationModal .quit-modal-btn-continue:hover {
    background: rgba(208, 0, 58, 0.1) !important;
    border-color: #B00030 !important;
}

/* Quit Application Button */
#quitConfirmationModal .quit-modal-btn-quit {
    background: linear-gradient(90deg, #D0003A, #AB2379) !important;
    color: white !important;
}

#quitConfirmationModal .quit-modal-btn-quit:hover {
    background: linear-gradient(90deg, #B00030, #9A2069) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}

/* Restore original quit modal styling that was working */
#quitConfirmationModal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 450px !important;
    min-width: 320px !important;
    padding: 20px !important;
    border-radius: 12px !important;
    background: white !important;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
}

/* Restore original button styling */
#quitConfirmationModal button {
    padding: 10px 16px !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important;
}

/* Continue Application Button - Original Style */
#quitConfirmationModal button:first-of-type {
    background: transparent !important;
    color: #D0003A !important;
    border: 1px solid #D0003A !important;
}

#quitConfirmationModal button:first-of-type:hover {
    background: rgba(208, 0, 58, 0.1) !important;
    border-color: #B00030 !important;
}

/* Quit Application Button - Original Style */
#quitConfirmationModal button:last-of-type {
    background: linear-gradient(90deg, #D0003A, #AB2379) !important;
    color: white !important;
    border: none !important;
}

#quitConfirmationModal button:last-of-type:hover {
    background: linear-gradient(90deg, #B00030, #9A2069) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(208, 0, 58, 0.3) !important;
}
    
    /* Success modal mobile responsive */
    .success-modal-content {
        min-width: auto;
        max-width: 95%;
        width: 95%;
        margin: 10px;
        top: 50%;
        left: 49%;
        transform: translate(-50%, -50%);
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .success-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .success-modal-body {
        padding: 1rem;
    }
    
    .success-modal-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Mobile modal content adjustments */
    .success-modal-content .modal-title {
        font-size: 1.1rem !important;
        line-height: 1.3;
    }
    
    .success-modal-content h5 {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .success-modal-content p {
        font-size: 0.9rem !important;
        line-height: 1.4;
    }
    
    .success-modal-content .btn {
        width: 100% !important;
        margin: 0.5rem 0;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile icon sizing */
    .success-modal-content .fa-check-circle {
        font-size: 3rem !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .success-modal-content {
        width: 98%;
        max-width: 98%;
        margin: 5px;
        max-height: 90vh;
    }
    
    .success-modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .success-modal-body {
        padding: 0.75rem;
    }
    
    .success-modal-footer {
        padding: 0.5rem 0.75rem;
    }
    
    .success-modal-content .modal-title {
        font-size: 1rem !important;
    }
    
    .success-modal-content h5 {
        font-size: 0.9rem !important;
    }
    
    .success-modal-content p {
        font-size: 0.8rem !important;
    }
    
    .success-modal-content .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .success-modal-content .fa-check-circle {
        font-size: 2.5rem !important;
    }
    
    /* Extra small mobile optimized resume fixes */
    .whole-resume {
        padding: 5px !important;
        margin: 0 !important;
    }
    
    .contact-info > div {
        padding: 3px 5px !important;
        min-width: auto !important;
    }
    
   
    
    .section-heading {
        font-size: 16px !important;
    }
    
    .profile-summary-section p,
    .skills-section p,
    .work-experience-section p,
    .education-section p {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
}

/* Landscape mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .success-modal-content {
        max-height: 80vh;
        top: 45%;
    }
    
    .success-modal-content .fa-check-circle {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .success-modal-body {
        padding: 0.75rem 1rem;
    }
}

/* Preview section styles */
.edit-resume-preview-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
    min-height: 600px;
    overflow-y: auto;
}

.edit-resume-preview-title {
    color: #D0003A;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #D0003A;
    padding-bottom: 0.5rem;
}

/* Loading states */
.edit-resume-loading {
    opacity: 0.6;
    pointer-events: none;
}

.edit-resume-loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #D0003A;
    border-radius: 50%;
    animation: edit-resume-spin 1s linear infinite;
}

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

/* Success/Error messages */
.edit-resume-alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.edit-resume-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.edit-resume-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Form validation styles */
.edit-resume-form-control.is-invalid {
    border-color: #dc3545;
}

.edit-resume-form-control.is-valid {
    border-color: #28a745;
}

.edit-resume-invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.edit-resume-valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* Project Description Points Styling */
.edit-resume-description-points-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 10px;
}

.edit-resume-point-input-group {
    transition: all 0.3s ease;
}

.edit-resume-point-input-group:hover {
    background: rgba(208, 0, 58, 0.05);
    border-radius: 6px;
    padding: 5px;
    margin: -5px;
}

.edit-resume-description-point-input {
    border-left: none;
}

.edit-resume-description-point-input:focus {
    border-color: #D0003A;
    box-shadow: 0 0 0 0.2rem rgba(208, 0, 58, 0.25);
}

.edit-resume-input-group-text {
    background-color: #D0003A;
    color: white;
    border-color: #D0003A;
    font-weight: bold;
}

.edit-resume-add-point-btn {
    transition: all 0.3s ease;
}

.edit-resume-add-point-btn:hover {
    background-color: #D0003A;
    color: white;
    border-color: #D0003A;
}

.edit-resume-remove-point-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 38px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    right: 0;
    margin-left: auto;
}

/* Ensure proper positioning in input groups */
.input-group .remove-point-btn {
    position: relative;
    right: 0;
    margin-left: auto;
    border-left: 1px solid #ced4da;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex-shrink: 0;
}

.input-group .form-control {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

/* Fix for Bootstrap input-group button positioning */
.input-group > .btn {
    position: relative;
    z-index: 2;
}

.input-group > .form-control {
    position: relative;
    z-index: 2;
}

/* Ensure the remove button stays on the right */
.input-group .remove-point-btn {
    order: 3;
    margin-left: -1px;
    position: relative;
    z-index: 3;
}

/* Specific styling for description point input groups */
.edit-resume-point-input-group .input-group {
    display: flex;
    align-items: stretch;
}

.edit-resume-point-input-group .input-group .input-group-text {
    flex-shrink: 0;
    border-right: 0;
}

.edit-resume-point-input-group .input-group .form-control {
    flex: 1;
    border-left: 0;
    border-right: 0;
}

.edit-resume-point-input-group .input-group .remove-point-btn {
    flex-shrink: 0;
    border-left: 1px solid #ced4da;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 44px;
}

/* Ensure proper button sizing and positioning */
.input-group .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 38px;
}

.edit-resume-remove-point-btn:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.edit-resume-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.edit-resume-input-group .edit-resume-input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.edit-resume-input-group .edit-resume-form-control {
    flex: 1;
    border-left: none;
}

.edit-resume-input-group .edit-resume-remove-point-btn {
    border-left: none;
}

/* Cross icon positioning */
.edit-resume-cross-icon {
    margin-left: 0px !important;
    position: relative !important;
    left: 0px !important;
}

/* Conditional field styling */
.edit-resume-conditional-field {
    transition: all 0.3s ease;
}

.edit-resume-conditional-field.hidden {
    display: none !important;
}

.edit-resume-conditional-row.hidden {
    display: none !important;
}

/* Full width column when conditional fields are hidden */
.edit-resume-col-full-width {
    width: 100% !important;
}

/* Dynamic skills layout styling */
.edit-resume-skills-row .col-md-3,
.edit-resume-skills-row .col-md-4,
.edit-resume-skills-row .col-md-6,
.edit-resume-skills-row .col-12 {
    transition: all 0.3s ease;
}

.edit-resume-skills-row .col-12 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.edit-resume-skills-row .col-md-4 {
    width: 33.333333% !important;
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

/* Card styling */
.edit-resume-card-header {
    background: linear-gradient(#AB2379 0%, #B51151 50%, #D0003A 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    position: relative;
    background-clip: padding-box;
}

.edit-resume-card-header h3 {
    color: white;
    margin-left: 10px;
    margin: 0;
    padding: 15px 20px 15px 20px;
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

/* Responsive styling for edit-resume-card-header h3 */
@media (max-width: 768px) {
    .edit-resume-card-header h3 {
        font-size: 1.1rem;
        padding: 12px 15px 12px 15px;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .edit-resume-card-header h3 {
        font-size: 1rem;
        padding: 10px 12px 10px 12px;
        margin-left: 6px;
    }
}

@media (max-width: 360px) {
    .edit-resume-card-header h3 {
        font-size: 0.9rem;
        padding: 8px 10px 8px 10px;
        margin-left: 5px;
    }
}

.edit-resume-card-header .edit-resume-icon {
    color: white;
}

/* Ensure background extends to rounded corners */
.edit-resume-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(#AB2379 0%, #B51151 50%, #D0003A 100%);
    border-radius: 10px 10px 0 0;
    z-index: 0;
}

.edit-resume-card-body {
    padding: 20px;
    /*max-height: 82vh;*/
    overflow-y: auto;
}

input.form-control.description-point-input {
    height: 44px;
}

i.fas.fa-times.edit-resume-icon {
    color: #ffff;
}
.edit-resume-preview-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
}

/* Fix topbar content positioning and centering */
#applyButtonContainer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Ensure buttons are properly centered */
#applyButtonContainer button {
    margin: 0 5px !important;
}

/* Mobile responsive for topbar */
@media (max-width: 768px) {
    #applyButtonContainer {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    #applyButtonContainer button {
        margin: 0 !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* Ensure the modal content is properly centered */
/* .modal-content {
    text-align: center !important;
} */

/* Ensure the title section is properly centered */
/* .modal-title,
.modal-body h2,
.modal-body p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
} */

/* Ensure proper spacing around the topbar */
#applyButtonContainer {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
}
