/* ===== Recruitment Detail Styles ===== */

/* Using core variables from /static/css/core/variables.css */

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header .back-button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    margin-right: 12px;
    flex-shrink: 0;
}

.mobile-header .header-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mobile-header .job-title-header {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-header .job-company-header {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide mobile header on desktop */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
}

/* Reset and base styles for mobile view */
body.mobile-recruitment-detail {
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* Hide desktop elements on mobile */
.mobile-recruitment-detail .navbar,
.mobile-recruitment-detail footer:not(.mobile-footer) {
    display: none;
}

@media (min-width: 768px) {
    .mobile-recruitment-detail .navbar,
    .mobile-recruitment-detail footer:not(.mobile-footer) {
        display: block;
    }
}

.job-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 6rem; /* Extra bottom padding for mobile apply button */
}

/* Add top padding on mobile to account for fixed header */
@media (max-width: 767px) {
    .job-detail-container {
        padding-top: 72px; /* 56px header + 16px spacing */
    }
    
    /* Hide job title and company name on mobile since they're in the mobile header */
    .job-title,
    .job-company {
        display: none;
    }
}

/* Make job-quick-info display in 1 column on mobile and tablet */
@media (max-width: 991.98px) {
    .job-quick-info {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Job Header */
/* Mobile-first: Clean white background without borders */
.job-header {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

/* Desktop: Add borders and shadows */
@media (min-width: 992px) {
    .job-header {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-sm);
        gap: 2rem;
    }
}

.job-header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
}

.company-logo-large {
    object-fit: contain;
    background: var(--gray-50);
    flex-shrink: 0;
}

.company-logo-large.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 2rem;
}

.job-header-info {
    flex-grow: 1;
}

.job-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.job-company {
    font-size: 1.125rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 1rem;
}

.job-quick-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-blue);
    width: 16px;
    text-align: center;
}

/* Apply Section */
.apply-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-slow);
    cursor: pointer;
    border: none;
    text-align: center;
}

.apply-btn.primary {
    background: var(--primary-blue);
    color: white;
}

.apply-btn.primary:hover {
    background: var(--primary-blue-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.apply-note {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: right;
}

/* Job Content */
.job-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Mobile-first: Clean white background without borders */
.job-main {
    background: white;
    padding: 1.5rem;
}

/* Desktop: Add borders and shadows */
@media (min-width: 992px) {
    .job-main {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 2rem;
        box-shadow: var(--shadow-sm);
    }
}

.job-section {
    margin-bottom: 2.5rem;
}

.job-section:last-child {
    margin-bottom: 0;
}

.job-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-blue-50);
}

.job-section h2 i {
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.job-description,
.job-requirements,
.job-benefits {
    line-height: 1.6;
    color: var(--gray-900);
}

.job-description h4,
.job-requirements h4,
.job-benefits h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: var(--gray-900);
}

.job-description ul,
.job-requirements ul,
.job-benefits ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.job-description li,
.job-requirements li,
.job-benefits li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.job-description li::before,
.job-requirements li::before,
.job-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: bold;
}

/* Job Sidebar */
.job-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Mobile-first: Clean white background without borders */
.sidebar-card {
    background: white;
    padding: 1.25rem;
    margin-top: 8px;
}

.sidebar-card:first-child {
    margin-top: 0;
}

/* Desktop: Add borders and shadows */
@media (min-width: 992px) {
    .sidebar-card {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        box-shadow: var(--shadow-sm);
        margin-top: 0;
    }
}

.sidebar-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.job-details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.detail-item i {
    color: var(--primary-blue);
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.detail-item div {
    display: flex;
    flex-direction: column;
}

.detail-item strong {
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-item span {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-item i {
    color: var(--primary-blue);
    width: 20px;
    text-align: center;
}

.contact-item a {
    color: var(--primary-blue);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Back Section */
.back-section {
    margin-top: 2rem;
    text-align: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary-blue);
    border-radius: var(--radius-md);
    transition: var(--transition-slow);
}

.back-btn:hover {
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
}

/* Job Not Found */
/* Mobile-first: Clean white background without borders */
.job-not-found {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
}

/* Desktop: Add borders and rounded corners */
@media (min-width: 992px) {
    .job-not-found {
        padding: 4rem 2rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--gray-200);
    }
}

.not-found-icon {
    font-size: 4rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.job-not-found h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.job-not-found p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Fixed Apply Button (Mobile) */
.fixed-apply {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1rem;
    box-shadow: 0 -0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    z-index: var(--z-action-button); /* Above mobile footer for better UX */
}

.fixed-apply .apply-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

/* Responsive Design */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 991.98px) {
    .job-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar-card {
        display: none;
    }
    
    .job-header {
        padding: 1.5rem;
    }
    
    .job-title {
        font-size: 1.5rem;
    }
    
    .job-quick-info {
        gap: 1rem;
    }
    
    /* job-main padding already defined in mobile-first section above */
    
    /* sidebar-card padding already defined in mobile-first section above */
    
    .job-section h2 {
        font-size: 1.25rem;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}

/* Dynamic Content Styles - Moved from inline styles in job_detail.html */
.job-section-content ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.job-section-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.job-section-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

.job-details-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
}

.job-details-list .detail-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: none;
    border-radius: 0;
    gap: 0.25rem;
}

.job-details-list .detail-item strong {
    color: var(--gray-600);
    font-weight: normal;
    font-size: 0.9rem;
}

.job-details-list .detail-item span {
    color: var(--gray-900);
    font-weight: 500;
}

/* ===== Unified Action Button System (from property detail) ===== */
.action-button-wrapper {
    padding: 16px;
    background: white;
}

.action-button {
    width: 100%;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.action-button--primary {
    padding: var(--space-4);
    background: var(--primary-blue);
    color: white;
}

.action-button--primary:hover {
    background: var(--primary-blue-dark);
}

.action-button--primary:active {
    background: var(--primary-blue-dark);
    transform: scale(0.98);
}

.action-button i {
    font-size: 18px;
}

/* ===== Booking Actions Layout ===== */
.booking-actions-row {
    display: flex;
    align-items: stretch;
    gap: var(--space-3);
}

.main-action {
    flex: 1;
    max-width: 60%;
}

.main-action--full {
    max-width: 100%;
}

.main-action--partial {
    max-width: 60%;
}

.extra-actions-group {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.extra-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: var(--space-2);
    cursor: pointer;
    transition: opacity var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.extra-action-item:hover {
    opacity: 0.7;
}

.extra-action-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-1);
}

.extra-action-item__icon i {
    font-size: 18px;
    color: var(--text-muted);
}

.extra-action-item__text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

/* ===== Sidebar/Footer Responsive Behavior ===== */
.sidebar-footer {
    background: white;
}

/* Mobile: Fixed Footer */
@media (max-width: 991px) {
    .sidebar-footer {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        z-index: var(--z-action-button);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        background: white;
        border-top: 1px solid #e0e0e0;
    }

    .sidebar-content {
        display: flex;
        flex-direction: column;
        background: white;
    }

    /* Action buttons in footer */
    .action-button-wrapper {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid #e0e0e0;
        background: white;
    }

    /* Hide sidebar cards on mobile */
    .sidebar-card {
        display: none;
    }

    /* Show action buttons on mobile */
    .action-button-wrapper {
        display: block !important;
    }

    /* Responsive behavior for booking actions */
    .booking-actions-row {
        flex-direction: row;
        align-items: stretch;
        gap: var(--space-2);
    }

    .main-action {
        flex: 1;
        max-width: 60%;
    }

    .extra-actions-group {
        flex-shrink: 0;
        gap: var(--space-2);
    }

    .extra-action-item {
        min-width: 50px;
        padding: var(--space-1);
    }

    .extra-action-item__text {
        font-size: 11px;
    }
}

/* Desktop: Sticky Sidebar */
@media (min-width: 992px) {

    .sidebar-content {
        position: sticky;
        top: 20px; /* Offset from top when sticky */
        max-height: calc(100vh - 40px); /* Viewport height minus top/bottom padding */
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #ccc #f8f9fa;
    }

    /* Custom scrollbar for webkit browsers */
    .sidebar-content::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-content::-webkit-scrollbar-track {
        background: #f8f9fa;
        border-radius: 3px;
    }

    .sidebar-content::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .sidebar-content::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

    .action-button-wrapper {
        padding: 0;
        margin-top: 24px;
    }

    /* Action buttons should show in desktop sidebar */
    .sidebar-footer .action-button-wrapper {
        display: block;
        padding: 16px 0;
    }

    /* Responsive behavior for booking actions */
    .booking-actions-row {
        flex-direction: column;
        gap: var(--space-2);
    }

    .main-action {
        max-width: 100%;
    }

    .extra-actions-group {
        justify-content: center;
        gap: var(--space-4);
    }

    .extra-action-item {
        min-width: 80px;
    }
}

/* ===== Job Application Bootstrap Modal Styles ===== */

/* Job Application Modal Dialog */
.job-application-modal {
    max-width: 500px;
}

@media (max-width: 991px) {
    .job-application-modal {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }

    .job-application-modal .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* Job Modal Header */
.job-modal-header {
    background: var(--primary-blue);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    position: relative;
}

@media (min-width: 992px) {
    .job-modal-header {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

.job-modal-header .modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.job-modal-header .btn-close {
    margin: 0;
    padding: 8px;
    opacity: 1;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* Job Modal Body */
.job-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

@media (max-width: 991px) {
    .job-modal-body {
        flex: 1;
        padding: 1.25rem;
    }
}

/* Job Modal Footer */
.job-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: white;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 991px) {
    .job-modal-footer {
        padding: 1rem 1.25rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    background: var(--primary-blue-50);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* Job Application Form Controls */
.job-form-control {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 16px;
    transition: border-color var(--transition-base);
    background: white;
    box-sizing: border-box;
}

.job-form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-50);
}

.job-form-control.error {
    border-color: var(--error);
    background-color: var(--error-50);
}

.job-form-control::placeholder {
    color: var(--gray-500);
}

/* Select dropdown specific styling */
select.job-form-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Error Messages */
.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.gender-error {
    margin-bottom: 0.5rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

/* Gender Options */
.gender-options {
    display: flex;
    gap: 2rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 16px;
    color: var(--gray-900);
    font-weight: 500;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-base);
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-blue);
    background: var(--primary-blue-50);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* CV Upload Area */
.cv-upload-area {
    border: 2px dashed var(--primary-blue-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    background: var(--primary-blue-25);
    cursor: pointer;
    transition: all var(--transition-base);
}

.cv-upload-area:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue-50);
}

.upload-icon {
    margin-bottom: 1rem;
}

.upload-icon i {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.upload-text {
    font-size: 16px;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
}

.upload-subtext strong {
    color: var(--primary-blue);
}

/* Submit Button */
.submit-button {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 1rem 2rem;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.submit-button:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modal Footer Actions */
.modal-footer-actions {
    display: flex;
    gap: 1rem;
}

.footer-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-base);
}

.footer-action-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--primary-blue-25);
}

.footer-action-btn i {
    font-size: 16px;
}

.chat-btn i {
    color: var(--primary-blue);
}

.call-btn i {
    color: var(--success);
}

/* Bootstrap handles modal animations automatically */

/* ===== Job Application Success Bootstrap Modal Styles ===== */

/* Success Modal Dialog */
.success-modal {
    max-width: 480px;
}

@media (max-width: 991px) {
    .success-modal {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }

    .success-modal .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* Success Modal Header */
.success-modal-header {
    border-bottom: none;
    padding: 1rem 1.5rem 0;
    justify-content: flex-end;
}

@media (max-width: 991px) {
    .success-modal-header {
        padding: 1rem 1.25rem 0;
    }
}

.success-modal-header .btn-close {
    margin: 0;
    padding: 8px;
}

/* Success Modal Body */
.success-modal-body {
    padding: 1rem 1.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .success-modal-body {
        padding: 1rem 2rem 3rem;
    }
}

@media (max-width: 991px) {
    .success-modal-body {
        flex: 1;
        padding: 1rem 1.25rem 2rem;
        justify-content: center;
    }
}

/* Success Icon */
.success-icon {
    margin: 0 auto 2rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--success-100);
    animation: successPulse 0.6s ease-out;
}

.success-icon i {
    font-size: 2.5rem;
    color: var(--success);
    animation: successCheck 0.8s ease-out 0.2s both;
}

/* Success animations */
@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes successCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Success Title */
.success-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2rem;
    line-height: 1.3;
}

/* Success Content */
.success-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Success Info Grid */
.success-info-grid {
    background: var(--gray-25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.success-info-item {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.success-info-item.full-width {
    grid-column: 1 / -1;
}

.success-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.success-value {
    font-size: 16px;
    color: var(--gray-900);
    font-weight: 600;
    word-break: break-word;
}

/* Success Message */
.success-message {
    margin-bottom: 2rem;
}

.success-message p {
    font-size: 16px;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.success-message p:last-child {
    margin-bottom: 0;
}

/* Return Home Button */
.return-home-button {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 1rem 2rem;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: auto;
}

.return-home-button:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.return-home-button:active {
    transform: translateY(0);
}

/* Mobile adjustments for success modal */
@media (max-width: 991px) {
    .success-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }

    .success-info-item.full-width {
        grid-column: 1;
    }

    .success-modal-container {
        padding: 2rem 1.25rem;
    }

    .success-title {
        font-size: 22px;
    }
}

/* Success modal animations handled by Bootstrap */

/* ===== Job Application Failure Bootstrap Modal Styles ===== */

/* Failure Modal Dialog */
.failure-modal {
    max-width: 480px;
}

@media (max-width: 991px) {
    .failure-modal {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }

    .failure-modal .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* Failure Modal Header */
.failure-modal-header {
    border-bottom: none;
    padding: 1rem 1.5rem 0;
    justify-content: flex-end;
}

@media (max-width: 991px) {
    .failure-modal-header {
        padding: 1rem 1.25rem 0;
    }
}

.failure-modal-header .btn-close {
    margin: 0;
    padding: 8px;
}

/* Failure Modal Body */
.failure-modal-body {
    padding: 1rem 1.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .failure-modal-body {
        padding: 1rem 2rem 3rem;
    }
}

@media (max-width: 991px) {
    .failure-modal-body {
        flex: 1;
        padding: 1rem 1.25rem 2rem;
        justify-content: center;
    }
}

/* Failure Icon */
.failure-icon {
    margin: 0 auto 2rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--error-100);
    animation: failurePulse 0.6s ease-out;
}

.failure-icon i {
    font-size: 2.5rem;
    color: var(--error);
    animation: failureShake 0.8s ease-out 0.2s both;
}

/* Failure animations */
@keyframes failurePulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes failureShake {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
        opacity: 1;
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
        opacity: 1;
    }
}

/* Failure Title */
.failure-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2rem;
    line-height: 1.3;
}

/* Failure Message */
.failure-message {
    margin-bottom: 2rem;
    background: var(--error-25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--error-100);
}

.failure-message p {
    font-size: 16px;
    color: var(--error-600);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.failure-message p:last-child {
    margin-bottom: 0;
}

/* Failure Actions */
.failure-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.retry-button, .contact-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.retry-button {
    background: var(--error);
    color: white;
}

.retry-button:hover {
    background: var(--error-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.retry-button:active {
    transform: translateY(0);
}

.contact-button {
    background: var(--success);
    color: white;
}

.contact-button:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.contact-button:active {
    transform: translateY(0);
}

.retry-button i, .contact-button i {
    font-size: 18px;
}

/* Mobile adjustments for failure modal */
@media (max-width: 991px) {
    .failure-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .failure-title {
        font-size: 22px;
    }

    .failure-message {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .fixed-apply,
    .apply-section,
    .back-section,
    .action-button-wrapper,
    .modal-overlay {
        display: none;
    }

    .job-detail-container {
        padding: 0;
    }

    .job-header,
    .job-main,
    .sidebar-card {
        border: none;
        box-shadow: none;
    }
}