/**
 * Modal Candidate Styles - Simplified Version
 * Uses native HTML dialog element
 * 
 * @package NLMC_TalentSpotlight
 */

/* Native Dialog Element - High specificity to override theme styles */
.nlmc-ts-modal-dialog,
dialog.nlmc-ts-modal-dialog,
.nlmc-ts-modal-dialog[open],
body .nlmc-ts-modal-dialog,
body dialog.nlmc-ts-modal-dialog,
html body .nlmc-ts-modal-dialog {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: auto !important;
    width: 90% !important;
    max-width: 800px !important;
    min-width: 320px !important;
    max-height: 90vh;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
    background: var(--nlmc-modal-single-bg, #ffffff) !important;
    position: relative !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.9) translateY(10px) !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity !important;
    /* Hide scrollbars on dialog itself - but allow content wrapper to scroll */
    overflow: visible !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
    /* Ensure dialog doesn't create scrollbars */
    max-height: 90vh !important;
}

/* Hide scrollbars for Chrome, Safari and Opera on dialog */
.nlmc-ts-modal-dialog::-webkit-scrollbar,
dialog.nlmc-ts-modal-dialog::-webkit-scrollbar,
.nlmc-ts-modal-dialog[open]::-webkit-scrollbar,
body .nlmc-ts-modal-dialog::-webkit-scrollbar,
html body .nlmc-ts-modal-dialog::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Show dialog when content is loaded - smooth zoom and fade in */
.nlmc-ts-modal-dialog.nlmc-ts-content-loaded,
.nlmc-ts-modal-dialog[open].nlmc-ts-content-loaded,
body .nlmc-ts-modal-dialog.nlmc-ts-content-loaded,
html body .nlmc-ts-modal-dialog.nlmc-ts-content-loaded {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 999999 !important;
    transform: scale(1) translateY(0) !important;
    animation: nlmcModalZoomIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Closing animation state - smooth zoom and fade out */
.nlmc-ts-modal-dialog.nlmc-ts-closing,
.nlmc-ts-modal-dialog[open].nlmc-ts-closing {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.9) translateY(10px) !important;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: none !important;
}

/* Zoom in animation - lightweight and smooth */
@keyframes nlmcModalZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Native dialog backdrop - ensure it's fixed */
.nlmc-ts-modal-dialog::backdrop,
dialog.nlmc-ts-modal-dialog::backdrop,
.nlmc-ts-modal-dialog[open]::backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 999998 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nlmc-ts-modal-dialog[open]::backdrop {
    opacity: 1 !important;
    animation: nlmcBackdropFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.nlmc-ts-modal-dialog[open].nlmc-ts-closing::backdrop {
    opacity: 0 !important;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: none !important;
}

/* Backdrop fade in animation */
@keyframes nlmcBackdropFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Prevent body scrolling when modal is open and hide all scrollbars */
/* High specificity to override any theme styles */
html.nlmc-ts-modal-open,
body.nlmc-ts-modal-open {
    overflow: hidden !important;
    height: 100% !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

html.nlmc-ts-modal-open body,
body.nlmc-ts-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars for Chrome, Safari and Opera on html/body when modal is open */
html.nlmc-ts-modal-open::-webkit-scrollbar,
html.nlmc-ts-modal-open body::-webkit-scrollbar,
body.nlmc-ts-modal-open::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    -webkit-appearance: none !important;
}

/* Hide scrollbars on all elements when modal is open (except modal content wrapper) */
html.nlmc-ts-modal-open *::-webkit-scrollbar,
html.nlmc-ts-modal-open body *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Exception: Allow scrolling in modal content wrapper (but hide its scrollbar) */
html.nlmc-ts-modal-open .nlmc-ts-modal-content-wrapper,
html.nlmc-ts-modal-open body .nlmc-ts-modal-content-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

html.nlmc-ts-modal-open .nlmc-ts-modal-content-wrapper::-webkit-scrollbar,
html.nlmc-ts-modal-open body .nlmc-ts-modal-content-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Manual backdrop overlay (JavaScript fallback) */
.nlmc-ts-modal-backdrop-overlay,
body .nlmc-ts-modal-backdrop-overlay,
html body .nlmc-ts-modal-backdrop-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 999998 !important;
    opacity: 0 !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: opacity 0.3s ease-out !important;
    /* Ensure backdrop stays fixed when scrolling */
    transform: translateZ(0) !important;
    will-change: transform, opacity !important;
}

.nlmc-ts-modal-backdrop-overlay.nlmc-ts-backdrop-visible {
    opacity: 1 !important;
    animation: nlmcBackdropFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.nlmc-ts-modal-backdrop-overlay.nlmc-ts-backdrop-closing {
    opacity: 0 !important;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: none !important;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .nlmc-ts-modal-dialog::backdrop {
        background: rgba(0, 0, 0, 0.75) !important;
    }
    
    .nlmc-ts-modal-backdrop-overlay {
        background: rgba(0, 0, 0, 0.75) !important;
        background-color: rgba(0, 0, 0, 0.75) !important;
    }
}

@supports not selector(::-webkit-backdrop) {
    .nlmc-ts-modal-dialog::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0);
        z-index: -1;
    }
}

/* Keyframe animations removed - using CSS transitions instead for better performance */

/* Modal Close Button - Simple X */
.nlmc-ts-modal-close,
button.nlmc-ts-modal-close,
.nlmc-ts-modal-dialog .nlmc-ts-modal-close,
.nlmc-ts-modal-dialog[open] .nlmc-ts-modal-close,
body .nlmc-ts-modal-close,
html body .nlmc-ts-modal-close,
html body .nlmc-ts-modal-dialog .nlmc-ts-modal-close,
html body dialog.nlmc-ts-modal-dialog .nlmc-ts-modal-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 1000 !important;
    background: transparent !important;
    border: none !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    color: #666666 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    text-align: center !important;
    float: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nlmc-ts-modal-close:hover,
.nlmc-ts-modal-close:focus {
    color: #000000 !important;
    cursor: pointer !important;
    outline: none !important;
    background: rgba(0, 0, 0, 0.05) !important;
    transform: scale(1.1) !important;
}

.nlmc-ts-modal-close:active {
    color: #333333 !important;
    cursor: pointer !important;
    transform: scale(0.95) !important;
}

.nlmc-ts-modal-edit-link,
.nlmc-ts-modal-dialog .nlmc-ts-modal-edit-link,
.nlmc-ts-modal-dialog[open] .nlmc-ts-modal-edit-link,
body .nlmc-ts-modal-edit-link,
html body .nlmc-ts-modal-edit-link,
html body .nlmc-ts-modal-dialog .nlmc-ts-modal-edit-link {
    position: absolute !important;
    top: 16px !important;
    right: 64px !important;
    left: auto !important;
    z-index: 1001 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #111827 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15) !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.nlmc-ts-modal-edit-link[hidden] {
    display: none !important;
}

.nlmc-ts-modal-edit-link:hover,
.nlmc-ts-modal-edit-link:focus-visible {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22) !important;
    text-decoration: none !important;
}

.nlmc-ts-modal-edit-link i {
    font-size: 14px !important;
}

/* Modal Content Wrapper */
.nlmc-ts-modal-content-wrapper,
body .nlmc-ts-modal-content-wrapper,
html body .nlmc-ts-modal-content-wrapper,
.nlmc-ts-modal-dialog .nlmc-ts-modal-content-wrapper,
.nlmc-ts-modal-dialog[open] .nlmc-ts-modal-content-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 90vh !important;
    padding: 50px !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    /* Hide scrollbar but keep scrolling functionality */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.nlmc-ts-modal-content-wrapper::-webkit-scrollbar,
body .nlmc-ts-modal-content-wrapper::-webkit-scrollbar,
html body .nlmc-ts-modal-content-wrapper::-webkit-scrollbar,
.nlmc-ts-modal-dialog .nlmc-ts-modal-content-wrapper::-webkit-scrollbar,
.nlmc-ts-modal-dialog[open] .nlmc-ts-modal-content-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    -webkit-appearance: none !important;
}

/* Loading Indicator - Centered on overlay, not blurred */
.nlmc-ts-modal-loading {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    background: transparent !important;
    z-index: 999999 !important; /* Above everything, including backdrop */
    pointer-events: none !important;
    /* Ensure spinner is not affected by backdrop blur */
    -webkit-filter: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.nlmc-ts-modal-loading i {
    color: #ffffff !important;
    font-size: 48px !important;
    animation: spin 1s linear infinite !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    /* Ensure icon is sharp and not blurred */
    -webkit-filter: none !important;
    filter: none !important;
    transform: translateZ(0) !important; /* Force hardware acceleration */
}

@keyframes spin {
    from {
        transform: rotate(0deg) translateZ(0);
    }
    to {
        transform: rotate(360deg) translateZ(0);
    }
}

/* Error Message */
.nlmc-ts-modal-error {
    padding: 40px;
    text-align: center;
    color: #d32f2f;
}

.nlmc-ts-modal-error p {
    margin: 0;
    font-size: 16px;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ============================================
   PREMIUM MODAL CONTENT STYLES
   Modern, professional candidate showcase design
   ============================================ */

.nlmc-ts-modal-premium-content {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
}

.nlmc-ts-modal-dialog .nlmc-ts-modal-premium-content,
.nlmc-ts-modal-dialog[open] .nlmc-ts-modal-premium-content,
body .nlmc-ts-modal-dialog .nlmc-ts-modal-premium-content,
html body .nlmc-ts-modal-dialog .nlmc-ts-modal-premium-content {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Modal Custom Section */
.nlmc-ts-modal-custom-section,
.nlmc-ts-modal-dialog .nlmc-ts-modal-custom-section,
body .nlmc-ts-modal-custom-section,
html body .nlmc-ts-modal-custom-section {
    padding: 0px 40px 0px 40px !important;
    background: #f8f9fa !important;
    border-top: none!important;
    margin-top: 20px !important;
}

.nlmc-ts-modal-custom-section * {
    max-width: 100%;
}

.nlmc-ts-modal-custom-section p:last-child {
    margin-bottom: 0;
}

/* Header Section with Icon, ID, and Title - SIMPLIFIED */
.nlmc-ts-modal-header {
    background: var(--nlmc-modal-single-bg, #ffffff) !important;
    padding: 20px 0px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 20px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    text-align: left !important;
}

.nlmc-ts-modal-header-copy,
.nlmc-ts-modal-dialog .nlmc-ts-modal-header-copy,
body .nlmc-ts-modal-header-copy,
html body .nlmc-ts-modal-header-copy {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px !important;
}

.nlmc-ts-modal-header-icon,
.nlmc-ts-modal-dialog .nlmc-ts-modal-header-icon,
body .nlmc-ts-modal-header-icon,
html body .nlmc-ts-modal-header-icon {
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--nlmc-modal-title-color, #333333) !important;
    margin-top: -7px !important;
}

.nlmc-ts-modal-header-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nlmc-ts-modal-header-icon i {
    font-size: 24px;
    color: #333333;
}

.nlmc-ts-modal-header-id,
.nlmc-ts-modal-dialog .nlmc-ts-modal-header-id,
body .nlmc-ts-modal-header-id,
html body .nlmc-ts-modal-header-id {
    font-family: var(--nlmc-modal-title-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    font-size: calc(var(--nlmc-modal-title-size, 20px) * 0.7) !important;
    font-weight: var(--nlmc-modal-title-weight, 700) !important;
    color: var(--nlmc-modal-body-color, #333333) !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.nlmc-ts-modal-header-title {
    font-family: var(--nlmc-modal-title-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    font-size: var(--nlmc-modal-title-size, 20px) !important;
    font-weight: var(--nlmc-modal-title-weight, 700) !important;
    color: var(--nlmc-modal-title-color, #333333) !important;
    margin: 0 !important;
    line-height: var(--nlmc-modal-title-line-height, 1.2) !important;
    text-align: left !important;
    align-self: stretch !important;
    width: 100% !important;
}

.nlmc-ts-modal-section{
    padding-top: 20px!important;
}

.nlmc-ts-modal-section:last-of-type {
    border-bottom: none;
}

.nlmc-ts-modal-section-title {
    font-family: var(--nlmc-modal-title-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    font-size: var(--nlmc-modal-title-size, 20px);
    font-weight: var(--nlmc-modal-title-weight, 700);
    color: var(--nlmc-modal-title-color, #1a1a1a);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: var(--nlmc-modal-title-line-height, 1.2);
}

.nlmc-ts-modal-section-title i {
    color: var(--nlmc-modal-btn-bg, #667eea);
    font-size: 18px;
}

/* Full Description Section - Simple Content Display */
.nlmc-ts-modal-full-description {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    color: var(--nlmc-modal-body-color, #333) !important;
    font-size: var(--nlmc-modal-body-size, 15px) !important;
    font-weight: var(--nlmc-modal-body-weight, 400) !important;
    line-height: var(--nlmc-modal-body-line-height, 1.6) !important;
    text-align: left !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

.nlmc-ts-modal-full-description ul,
.nlmc-ts-modal-full-description ol {
    list-style-position: outside !important;
    padding-left: 20px !important;
    margin: 10px 0 !important;
}

.nlmc-ts-modal-full-description li {
    margin-bottom: 10px !important;
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    color: var(--nlmc-modal-body-color, #333) !important;
    font-size: var(--nlmc-modal-body-size, 15px) !important;
    font-weight: var(--nlmc-modal-body-weight, 400) !important;
    line-height: var(--nlmc-modal-body-line-height, 1.6) !important;
}

.nlmc-ts-modal-full-description p {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    color: var(--nlmc-modal-body-color, #333) !important;
    font-size: var(--nlmc-modal-body-size, 15px) !important;
    font-weight: var(--nlmc-modal-body-weight, 400) !important;
    line-height: var(--nlmc-modal-body-line-height, 1.6) !important;
    margin: 10px 0 !important;
}

.nlmc-ts-modal-full-description p:first-child {
    margin-top: 0 !important;
}

.nlmc-ts-modal-full-description p:last-child {
    margin-bottom: 0 !important;
}

/* Taxonomy Badges */
.nlmc-ts-modal-taxonomy-badges,
.nlmc-ts-modal-dialog .nlmc-ts-modal-taxonomy-badges,
body .nlmc-ts-modal-taxonomy-badges,
html body .nlmc-ts-modal-taxonomy-badges,
.nlmc-ts-modal-content-wrapper .nlmc-ts-modal-taxonomy-badges,
.nlmc-ts-modal-dialog .nlmc-ts-modal-content-wrapper .nlmc-ts-modal-taxonomy-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 0px !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    margin-top: 20px !important;
}

.nlmc-ts-modal-badge-taxonomy,
.nlmc-ts-modal-dialog .nlmc-ts-modal-badge-taxonomy,
body .nlmc-ts-modal-badge-taxonomy,
html body .nlmc-ts-modal-badge-taxonomy {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    background: #e3f2fd !important;
    color: var(--nlmc-modal-btn-bg, #1976d2) !important;
    line-height: 1.4 !important;
}

/* Info Grid */
.nlmc-ts-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 32px 40px;
    background: #f8f9fa;
}

/* Hide empty containers to prevent extra space */
.nlmc-ts-modal-info-grid:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nlmc-ts-modal-custom-section:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nlmc-ts-modal-section:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nlmc-ts-modal-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--nlmc-modal-single-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.nlmc-ts-modal-info-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nlmc-ts-modal-info-item-row {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.nlmc-ts-modal-info-item-row .nlmc-ts-modal-info-icon {
    flex-shrink: 0;
}

.nlmc-ts-modal-info-item-row .nlmc-ts-modal-info-content {
    flex: 1;
    min-width: 0;
}

.nlmc-ts-modal-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nlmc-ts-modal-info-icon i {
    color: #ffffff;
    font-size: 20px;
}

.nlmc-ts-modal-info-content {
    flex: 1;
    min-width: 0;
}

.nlmc-ts-modal-info-label {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nlmc-modal-body-color, #666);
    margin-bottom: 6px;
    opacity: 0.8;
}

.nlmc-ts-modal-info-value {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    font-size: var(--nlmc-modal-body-size, 16px);
    font-weight: var(--nlmc-modal-body-weight, 600);
    color: var(--nlmc-modal-body-color, #1a1a1a);
    line-height: var(--nlmc-modal-body-line-height, 1.4);
}

/* Skills Section */
.nlmc-ts-modal-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nlmc-ts-modal-skill-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    font-size: var(--nlmc-modal-body-size, 14px);
    font-weight: var(--nlmc-modal-body-weight, 500);
    transition: all 0.2s ease;
}

.nlmc-ts-modal-skill-tag:hover {
    background: #bbdefb;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    color: var(--nlmc-modal-btn-bg-hover, #1976d2);
}

/* Bio Section */
.nlmc-ts-modal-bio {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    color: var(--nlmc-modal-body-color, #555);
    font-size: var(--nlmc-modal-body-size, 15px);
    font-weight: var(--nlmc-modal-body-weight, 400);
    line-height: var(--nlmc-modal-body-line-height, 1.7);
}

.nlmc-ts-modal-bio p {
    font-family: var(--nlmc-modal-body-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    color: var(--nlmc-modal-body-color, #555);
    font-size: var(--nlmc-modal-body-size, 15px);
    font-weight: var(--nlmc-modal-body-weight, 400);
    line-height: var(--nlmc-modal-body-line-height, 1.7);
    margin: 0 0 16px 0;
}

.nlmc-ts-modal-bio p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    html.nlmc-ts-modal-open body,
    body.nlmc-ts-modal-open {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
    }

    .nlmc-ts-modal-dialog,
    dialog.nlmc-ts-modal-dialog,
    .nlmc-ts-modal-dialog[open],
    body .nlmc-ts-modal-dialog,
    html body .nlmc-ts-modal-dialog {
        width: 95% !important;
        max-width: 95% !important;
        min-width: 320px !important;
        height: auto;
        max-height: 95vh;
        border-radius: 8px;
        margin: 0;
    }

    .nlmc-ts-modal-content-wrapper,
    body .nlmc-ts-modal-content-wrapper,
    html body .nlmc-ts-modal-content-wrapper,
    .nlmc-ts-modal-dialog .nlmc-ts-modal-content-wrapper,
    .nlmc-ts-modal-dialog[open] .nlmc-ts-modal-content-wrapper {
        max-height: calc(95vh - 24px) !important;
        max-height: calc(95dvh - 24px) !important;
        padding: 44px 24px 20px 24px !important;
    }

    .nlmc-ts-modal-info-grid {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 16px;
    }

    .nlmc-ts-modal-close {
        top: 16px !important;
        right: 16px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    .nlmc-ts-modal-dialog,
    dialog.nlmc-ts-modal-dialog,
    .nlmc-ts-modal-dialog[open],
    body .nlmc-ts-modal-dialog,
    html body .nlmc-ts-modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        max-height: 100vh;
        border-radius: 0;
        margin: 0 !important;
    }

    .nlmc-ts-modal-content-wrapper,
    body .nlmc-ts-modal-content-wrapper,
    html body .nlmc-ts-modal-content-wrapper,
    .nlmc-ts-modal-dialog .nlmc-ts-modal-content-wrapper,
    .nlmc-ts-modal-dialog[open] .nlmc-ts-modal-content-wrapper {
        max-height: 100vh !important;
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        padding: 44px 18px 18px 18px !important;
    }
    
    .nlmc-ts-modal-info-grid {
        padding: 20px 16px;
    }

    .nlmc-ts-modal-close {
        top: 12px !important;
        right: 12px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 22px !important;
    }
}

