/**
 * Single Candidate Page Styles
 * Matches the admin preview template exactly
 */

/* Font Awesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

/* Reset and base styles */
.nlmc-ts-single-candidate-page {
    margin: 0;
    padding: 0;
    font-family: var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    line-height: 1.6;
    color: var(--nlmc-body-color, #333333);
    background-color: var(--nlmc-single-bg, #ffffff);
}

.nlmc-ts-single-candidate-container {
    max-width: 100%;
    margin: 50px 0;
    padding: var(--nlmc-single-pad-top, 40px) 0 var(--nlmc-single-pad-bot, 40px);
    background-color: var(--nlmc-single-bg, #ffffff);
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-body-size, 17px);
    line-height: var(--nlmc-single-body-lh, 1.7);
    color: var(--nlmc-single-body-color, #333333);
    font-weight: var(--nlmc-single-body-weight, 400);
}

/* Back Button Styles */
.nlmc-ts-back-button { 
    margin-bottom: 20px; 
    max-width: var(--nlmc-container-max, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--nlmc-container-pad-left, 20px);
    padding-right: var(--nlmc-container-pad-right, 20px);
}
.nlmc-ts-back-link { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    color: var(--nlmc-btn-bg, #004874); 
    text-decoration: none; 
    font-weight: 500; 
    transition: color 0.2s ease; 
    font-size: 14px;
}
.nlmc-ts-back-link:hover { 
    color: var(--nlmc-btn-bg-hover, #013a5a); 
}
.nlmc-ts-back-link i {
    font-size: 12px;
}

/* Previous/Next Navigation */
.nlmc-ts-prev-next-navigation {
    margin-bottom: 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid #eee;
}

.nlmc-ts-nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nlmc-ts-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.nlmc-ts-nav-link:hover {
    background: var(--nlmc-btn-bg-hover, #013a5a);
    color: var(--nlmc-btn-text, #ffffff);
    border-color: var(--nlmc-btn-bg-hover, #013a5a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 58, 90, 0.2);
}

.nlmc-ts-nav-link.nlmc-ts-nav-disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.nlmc-ts-nav-link.nlmc-ts-nav-disabled:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #e9ecef;
    transform: none;
    box-shadow: none;
}

.nlmc-ts-nav-prev {
    justify-content: flex-start;
}

.nlmc-ts-nav-next {
    justify-content: flex-end;
}

.nlmc-ts-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nlmc-ts-nav-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.nlmc-ts-nav-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nlmc-ts-nav-link i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nlmc-ts-nav-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .nlmc-ts-nav-link {
        max-width: 100%;
        width: 100%;
    }
    
    .nlmc-ts-nav-title {
        font-size: 13px;
    }
}

.nlmc-ts-single-candidate-content {
    max-width: 800px;
    margin: 0 auto;
}

.nlmc-ts-single-candidate-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: var(--nlmc-container-max, 1200px);
    margin: 0 auto;
    padding-left: var(--nlmc-container-pad-left, 20px);
    padding-right: var(--nlmc-container-pad-right, 20px);
}

.nlmc-ts-single-main-content {
    flex: 2;
    min-width: 0;
}

.nlmc-ts-single-form-sidebar {
    flex: 1;
    min-width: 0;
}

/* Header Section */
.nlmc-ts-single-header {
    margin-bottom: 0px;
    padding-bottom: 0px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.nlmc-ts-single-image {
    flex-shrink: 0;
    max-width: var(--nlmc-single-image-max, 480px);
}

.nlmc-ts-candidate-photo {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--nlmc-single-image-shape, 12px);
}

.nlmc-ts-image-placeholder.large {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--nlmc-single-image-shape, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nlmc-ts-image-placeholder.large .nlmc-ts-star-icon {
    color: #fff;
    font-size: 48px;
}

.nlmc-ts-single-info {
    flex: 1;
}

.nlmc-ts-single-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0 16px 0;
    font-size: 16px;
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
}

.nlmc-ts-candidate-id {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 12px;
    margin-bottom: 20px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    width: auto;
    max-width: max-content;
}

.nlmc-ts-candidate-badge-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.nlmc-ts-candidate-badge-row .nlmc-ts-candidate-id {
    margin-bottom: 0;
}

.nlmc-ts-market-type-badge,
.nlmc-ts-relocation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.nlmc-ts-relocation-badge {
    background: #f1f8e9;
    color: #558b2f;
}

.nlmc-ts-meta-item {
    color: var(--nlmc-single-body-color, #333333);
    line-height: 1.4;
}

.nlmc-ts-meta-item strong {
    color: var(--nlmc-single-title-color, #111111);
    font-weight: 600;
}

.nlmc-ts-single-title {
    font-size: var(--nlmc-single-title-size, 30px) !important;
    font-weight: var(--nlmc-single-title-weight, 700) !important;
    color: var(--nlmc-single-title-color, #111111) !important;
    line-height: var(--nlmc-single-title-lh, 1.2) !important;
    margin: 0 0 8px;
    font-family: var(--nlmc-single-title-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
}


/* Unified Title and Body Font Classes */
.nlmc-title {
    font-family: var(--nlmc-single-title-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-title-size, 30px);
    font-weight: var(--nlmc-single-title-weight, 700);
    color: var(--nlmc-single-title-color, #111111);
    line-height: var(--nlmc-single-title-lh, 1.2);
    margin: 0 0 8px;
}

.nlmc-ts-body {
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-body-size, 17px);
    color: var(--nlmc-single-body-color, #333333);
    font-weight: var(--nlmc-single-body-weight, 400);
    line-height: var(--nlmc-single-body-lh, 1.7);
}

/* Content Sections */
.nlmc-ts-single-content {
    margin-top: 20px;
}

.nlmc-ts-single-section {
    margin-bottom: var(--nlmc-single-section-margin, 32px);
    padding-bottom: 24px;
    border-bottom: var(--nlmc-single-divider, 1px) var(--nlmc-single-divider-style, solid) #eee;
}

.nlmc-ts-single-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.nlmc-ts-single-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
    font-family: var(--nlmc-single-title-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
}

.nlmc-ts-single-content-text {
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-body-size, 17px);
    line-height: var(--nlmc-single-body-lh, 1.7);
    color: var(--nlmc-single-body-color, #333333);
    font-weight: var(--nlmc-single-body-weight, 400);
}

.nlmc-ts-single-content-text p {
    margin: 0 0 16px;
}

.nlmc-ts-single-content-text ul {
    margin: 0 0 16px;
    padding-left: 20px;
    list-style: disc;
}

.nlmc-ts-single-content-text ol {
    margin: 0 0 16px;
    padding-left: 20px;
    list-style: decimal;
}

.nlmc-ts-single-content-text li {
    margin-bottom: 8px;
    padding-left: 0;
    display: list-item;
}

.nlmc-ts-bullet-star {
    color: var(--nlmc-single-bullet-color, #004874);
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Skills Grid */
.nlmc-ts-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nlmc-ts-skill-tag {
    background: #f0f0f0;
    color: #555;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* Highlights List */
.nlmc-ts-highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nlmc-ts-highlights-list li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-left: 0;
}

.nlmc-ts-highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.nlmc-ts-highlights-list .nlmc-ts-bullet-star {
    color: var(--nlmc-single-bullet-color, #004874);
    font-size: 12px;
    margin-top: 0;
    flex-shrink: 0;
    line-height: 1.4;
}
.nlmc-ts-education-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 16px;
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-body-size, 17px);
    line-height: var(--nlmc-single-body-lh, 1.7);
    color: var(--nlmc-single-body-color, #333333);
    font-weight: var(--nlmc-single-body-weight, 400);
}
.nlmc-ts-education-list li {
    display: list-item;
    margin-bottom: 6px;
}
.nlmc-ts-certifications-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 16px;
    font-family: var(--nlmc-single-body-font-family, var(--nlmc-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));
    font-size: var(--nlmc-single-body-size, 17px);
    line-height: var(--nlmc-single-body-lh, 1.7);
    color: var(--nlmc-single-body-color, #333333);
    font-weight: var(--nlmc-single-body-weight, 400);
}
.nlmc-ts-certifications-list li {
    display: list-item;
    margin-bottom: 6px;
}
.nlmc-ts-market-type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Contact Links */
.nlmc-ts-contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nlmc-ts-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--nlmc-btn-bg, #004874);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nlmc-ts-contact-link:hover {
    color: var(--nlmc-btn-bg-hover, #013a5a);
}

.nlmc-ts-contact-link i {
    font-size: 16px;
}

/* Form Section */
.nlmc-ts-form-bottom-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #eee;
}

.nlmc-ts-form-section {
    background: var(--nlmc-single-form-bg, #f7f7f7);
    padding: var(--nlmc-single-form-padding, 24px);
    border-radius: 8px;
    margin: 0;
}

.nlmc-ts-form-container {
    margin-top: 16px;
}

.nlmc-ts-form-section h3 {
    margin-top: 0;
    color: #1a1a1a;
}

.nlmc-ts-form-section p {
    margin-bottom: 20px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nlmc-ts-single-header {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }
    
    .nlmc-ts-single-image {
        align-self: center;
    }
    
    .nlmc-ts-candidate-photo,
    .nlmc-ts-image-placeholder.large {
        width: 150px;
        height: 150px;
    }
    
    .nlmc-ts-image-placeholder.large .nlmc-ts-star-icon {
        font-size: 36px;
    }
    
    .nlmc-ts-single-title {
        font-size: calc(var(--nlmc-single-title-size, 30px) * 0.8) !important;
    }
    
    .nlmc-ts-contact-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .nlmc-ts-single-candidate-container {
        padding: 20px 0;
    }
    
    .nlmc-ts-single-title {
        font-size: calc(var(--nlmc-single-title-size, 30px) * 0.67) !important;
    }
    
    .nlmc-ts-single-section h3 {
        font-size: 18px;
    }
    
    .nlmc-ts-skills-grid {
        justify-content: center;
    }
}

/* Image alignment classes */
.nlmc-ts-single-image.align-left {
    text-align: left;
}

.nlmc-ts-single-image.align-center {
    text-align: center;
}

.nlmc-ts-single-image.align-right {
    text-align: right;
}

/* Image shape classes */
.nlmc-ts-candidate-photo.shape-square,
.nlmc-ts-image-placeholder.large.shape-square {
    border-radius: 0;
}

.nlmc-ts-candidate-photo.shape-rounded,
.nlmc-ts-image-placeholder.large.shape-rounded {
    border-radius: 12px;
}

.nlmc-ts-candidate-photo.shape-circle,
.nlmc-ts-image-placeholder.large.shape-circle {
    border-radius: 50%;
}

/* Animation classes */
.nlmc-ts-single-candidate-container.nlmc-ts-animation-fade {
    animation: fadeIn 0.6s ease-in-out;
}

.nlmc-ts-single-candidate-container.nlmc-ts-animation-slide-up {
    animation: slideUp 0.6s ease-out;
}

.nlmc-ts-single-candidate-container.nlmc-ts-animation-zoom {
    animation: zoomIn 0.6s ease-out;
}

.nlmc-ts-single-candidate-container.nlmc-ts-animation-none {
    animation: none;
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Sidebar Styles */
.nlmc-ts-form-section {
    background: var(--nlmc-single-form-bg, #f7f7f7);
    padding: var(--nlmc-single-form-padding, 24px);
    border-radius: 8px;
    margin-top: 20px;
}

.nlmc-ts-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--nlmc-single-title-color, #111111);
    margin: 0 0 12px;
}

.nlmc-ts-form-section p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--nlmc-single-body-color, #333333);
    margin: 0 0 16px;
}

/* Ensure spacing between subtitle shortcodes and the Gravity Form */
.nlmc-ts-form-subtitle {
    margin: 0 0 16px; /* default breathing room below subtitle */
}
.nlmc-ts-form-subtitle::after {
    content: "";
    display: block;
    clear: both; /* ensure the Gravity Form starts below floated buttons */
}
.nlmc-ts-form-subtitle-spacer {
    height: 16px; /* space between subtitle and form */
}
/* In case a theme shortcode floats left/right, ensure the form clears it */
.nlmc-ts-form-section .nlmc-ts-form-container {
    clear: both;
}

.nlmc-ts-form-container {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Apply button radius to form buttons */
.nlmc-ts-form-container input[type="submit"],
.nlmc-ts-form-container button[type="submit"],
.nlmc-ts-form-container .gform_button,
.nlmc-ts-form-container .gform_submit {
    border-radius: var(--nlmc-single-btn-radius, 10px) !important;
}

/* Gravity Forms Responsive Styles */
.nlmc-ts-form-container .gform_wrapper {
    max-width: 100%;
}

/* Gravity Forms field layout responsive fixes */
.nlmc-ts-form-container .gform_wrapper .gform_fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nlmc-ts-form-container .gform_wrapper .gfield {
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Handle Gravity Forms multi-column layouts - default responsive behavior */
.nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_left_fourth,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_fourth,
.nlmc-ts-form-container .gform_wrapper .gfield.gf_right_fourth {
    /* Base responsive styles - mobile first approach */
}

/* When force single column is disabled, allow multi-column on desktop */
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half,
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half {
    width: calc(50% - 8px) !important;
    float: left !important;
    clear: none !important;
    margin-right: 16px !important;
    margin-left: 0 !important;
}

:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half:nth-child(2n),
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half:nth-child(2n) {
    margin-right: 0 !important;
}

:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third,
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third,
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third {
    width: calc(33.333% - 11px) !important;
    float: left !important;
    clear: none !important;
    margin-right: 16px !important;
    margin-left: 0 !important;
}

:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third:nth-child(3n+1),
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third:nth-child(3n+1),
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third:nth-child(3n+1) {
    margin-left: 0 !important;
}

:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third:nth-child(3n),
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third:nth-child(3n),
:root:not([style*="--nlmc-single-form-force-single-column: 1"]) .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third:nth-child(3n) {
    margin-right: 0 !important;
}

/* Force single column layout when setting is enabled */
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_fourth,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_fourth,
:root[style*="--nlmc-single-form-force-single-column: 1"] .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_fourth {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Alternative approach: Force single column for all Gravity Forms fields when body has specific class */
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_fourth,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_fourth,
body.nlmc-ts-force-single-column .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_fourth {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Gravity Forms field labels and inputs */
.nlmc-ts-form-container .gform_wrapper .gfield_label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.nlmc-ts-form-container .gform_wrapper .gfield input[type="text"],
.nlmc-ts-form-container .gform_wrapper .gfield input[type="email"],
.nlmc-ts-form-container .gform_wrapper .gfield input[type="tel"],
.nlmc-ts-form-container .gform_wrapper .gfield input[type="url"],
.nlmc-ts-form-container .gform_wrapper .gfield input[type="password"],
.nlmc-ts-form-container .gform_wrapper .gfield textarea,
.nlmc-ts-form-container .gform_wrapper .gfield select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nlmc-ts-form-container .gform_wrapper .gfield input:focus,
.nlmc-ts-form-container .gform_wrapper .gfield textarea:focus,
.nlmc-ts-form-container .gform_wrapper .gfield select:focus {
    outline: none;
    border-color: var(--nlmc-btn-bg, #004874);
    box-shadow: 0 0 0 3px rgba(0, 72, 116, 0.1);
}

/* Gravity Forms file upload styling */
.nlmc-ts-form-container .gform_wrapper .gfield_fileupload {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nlmc-ts-form-container .gform_wrapper .gfield_fileupload:hover {
    border-color: var(--nlmc-btn-bg, #004874);
    background: #f0f8ff;
}

/* Gravity Forms validation styling */
.nlmc-ts-form-container .gform_wrapper .gfield_error input,
.nlmc-ts-form-container .gform_wrapper .gfield_error textarea,
.nlmc-ts-form-container .gform_wrapper .gfield_error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.nlmc-ts-form-container .gform_wrapper .gfield_validation_message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Gravity Forms submit button */
.nlmc-ts-form-container .gform_wrapper .gform_button,
.nlmc-ts-form-container .gform_wrapper .gform_submit {
    background: var(--nlmc-btn-bg, #004874) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: var(--nlmc-single-btn-radius, 10px) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    max-width: 100% !important;
}

.nlmc-ts-form-container .gform_wrapper .gform_button:hover,
.nlmc-ts-form-container .gform_wrapper .gform_submit:hover {
    background: var(--nlmc-btn-bg-hover, #013a5a) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 72, 116, 0.3);
}

/* Responsive adjustments for form sidebar */
@media (max-width: 768px) {
    .nlmc-ts-single-candidate-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .nlmc-ts-single-main-content,
    .nlmc-ts-single-form-sidebar {
        flex: none;
        width: 100%;
    }

    /* Force single column on mobile for all Gravity Forms fields */
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_half,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_half,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_third,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_third,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_third,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_left_fourth,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_middle_fourth,
    .nlmc-ts-form-container .gform_wrapper .gfield.gf_right_fourth {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Additional mobile-specific Gravity Forms fixes */
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="text"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="email"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="tel"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="url"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="password"],
    .nlmc-ts-form-container .gform_wrapper .gfield textarea,
    .nlmc-ts-form-container .gform_wrapper .gfield select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    .nlmc-ts-form-container .gform_wrapper .gform_button,
    .nlmc-ts-form-container .gform_wrapper .gform_submit {
        padding: 16px 24px !important;
        font-size: 18px !important;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .nlmc-ts-form-container {
        padding: 16px;
        margin: 0 -10px;
    }
    
    .nlmc-ts-form-section {
        padding: 16px;
        margin: 0 -10px;
    }
    
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="text"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="email"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="tel"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="url"],
    .nlmc-ts-form-container .gform_wrapper .gfield input[type="password"],
    .nlmc-ts-form-container .gform_wrapper .gfield textarea,
    .nlmc-ts-form-container .gform_wrapper .gfield select {
        padding: 12px 14px;
        font-size: 16px;
    }
}

