/* Jobs Page Styles - LocalCareers */
/* Matches employers.io/jobs design */

/* Prevent horizontal scroll on mobile */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Search Section */
.jobs-search-section {
    background: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.jobs-search-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.jobs-search-form {
    width: 100%;
}

.jobs-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.jobs-input-group {
    display: flex;
    flex: 1;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.jobs-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.jobs-input-wrapper:first-child {
    border-radius: 50px 0 0 50px;
    border-right: none;
    flex: 1.5;
}

.jobs-input-wrapper:last-child {
    border-radius: 0 50px 50px 0;
    border-left: 1px solid #e5e7eb;
    flex: 1;
}

.jobs-input-wrapper svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
    flex-shrink: 0;
}

.jobs-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.jobs-input::placeholder {
    color: #9ca3af;
}

.jobs-search-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.jobs-search-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Main Content */
.jobs-main {
    background: #f9fafb;
    min-height: calc(100vh - 200px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.jobs-main-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
}

/* Job Listings Column */
.jobs-listings-column {
    display: flex;
    flex-direction: column;
}

.jobs-listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.jobs-listings-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.jobs-alert-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.jobs-alert-btn:hover {
    background: #f3f4f6;
}

.jobs-alert-btn svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.jobs-listings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: opacity 0.3s ease-in-out;
    width: 100%;
    max-width: 100%;
}

/* Job Card */
.jobs-card {
    display: flex;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
}

.jobs-card:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.jobs-card.active {
    background: #f0f9ff;
    border-color: #2563eb;
    border-left: 3px solid #2563eb;
}

.jobs-save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.jobs-card:hover .jobs-save-btn {
    opacity: 1;
}

.jobs-save-btn:hover {
    background: #fee2e2;
}

.jobs-save-btn svg {
    width: 18px;
    height: 18px;
    color: #9ca3af;
}

.jobs-save-btn:hover svg {
    color: #ef4444;
}

.jobs-card-content {
    display: flex;
    gap: 14px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.jobs-card-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.jobs-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.jobs-card-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.jobs-card-logo-placeholder {
    width: 48px;
    height: 48px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border-radius: 8px;
}

.jobs-card-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.jobs-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 30px;
}

.jobs-card-company {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 6px;
}

.jobs-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
}

.jobs-card-location::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    margin-right: 4px;
    vertical-align: middle;
}

.jobs-card-date::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    margin-right: 4px;
    vertical-align: middle;
}

/* Pagination */
.jobs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    margin-top: 8px;
}

.jobs-page-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.jobs-page-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.jobs-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 14px;
    color: #6b7280;
}

/* Job Detail Column */
.jobs-detail-column {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.jobs-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: #9ca3af;
}

.jobs-detail-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.jobs-detail-placeholder p {
    font-size: 16px;
}

.jobs-detail-content {
    padding: 24px;
}

.jobs-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.jobs-detail-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.jobs-detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.jobs-detail-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.jobs-detail-logo-placeholder {
    width: 64px;
    height: 64px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    border-radius: 10px;
}

.jobs-detail-title-section {
    flex: 1;
}

.jobs-detail-title-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
    line-height: 1.3;
}

.jobs-detail-company {
    font-size: 15px;
    color: #4b5563;
    margin: 0 0 8px;
}

.jobs-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.jobs-detail-location::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    margin-right: 6px;
    vertical-align: middle;
}

.jobs-detail-date::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    margin-right: 6px;
    vertical-align: middle;
}

.jobs-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jobs-detail-save {
    background: transparent;
    border: 1px solid #e5e7eb;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.jobs-detail-save:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.jobs-detail-save svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.jobs-detail-save:hover svg {
    color: #ef4444;
}

.jobs-detail-apply {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.jobs-detail-apply:hover {
    background: #1d4ed8;
    text-decoration: none;
    color: #fff;
}

.jobs-detail-body {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.jobs-detail-body p {
    margin: 0 0 16px;
}

.jobs-detail-body ul,
.jobs-detail-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.jobs-detail-body li {
    margin-bottom: 8px;
}

.jobs-detail-body h3,
.jobs-detail-body h4 {
    font-weight: 600;
    color: #1f2937;
    margin: 24px 0 12px;
}

.jobs-detail-description {
    max-height: 400px;
    overflow-y: auto;
}

.jobs-detail-description p {
    margin: 0 0 12px;
}

/* Loading State */
.jobs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

.jobs-loading-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.jobs-loading-dots span {
    width: 10px;
    height: 10px;
    background: #2563eb;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.jobs-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.jobs-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.jobs-loading p {
    font-size: 14px;
}

.jobs-no-results,
.jobs-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 15px;
}

.jobs-error {
    color: #dc2626;
}

/* Mobile Job Detail Modal (Bottom Sheet) */
.jobs-mobile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.jobs-mobile-modal.active {
    display: block;
}

.jobs-mobile-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.jobs-mobile-modal-sheet {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.jobs-mobile-modal-handle {
    display: none;
}

.jobs-mobile-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
}

.jobs-mobile-modal-close svg {
    width: 24px;
    height: 24px;
}

.jobs-mobile-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.jobs-mobile-modal-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.jobs-mobile-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.jobs-mobile-modal-logo-placeholder {
    width: 48px;
    height: 48px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border-radius: 8px;
}

.jobs-mobile-modal-info {
    flex: 1;
    min-width: 0;
    padding-right: 40px;
}

.jobs-mobile-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px;
    line-height: 1.3;
}

.jobs-mobile-modal-company {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 8px;
}

.jobs-mobile-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
}

.jobs-mobile-modal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jobs-mobile-modal-meta svg {
    width: 14px;
    height: 14px;
}

.jobs-mobile-modal-save {
    position: absolute;
    top: 58px;
    right: 20px;
    background: transparent;
    border: 1px solid #e5e7eb;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
}

.jobs-mobile-modal-save svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.jobs-mobile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.jobs-mobile-modal-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px;
}

.jobs-mobile-modal-description {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    white-space: pre-wrap;
}

.jobs-mobile-modal-description p {
    margin: 0 0 12px;
}

.jobs-mobile-modal-description ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.jobs-mobile-modal-description li {
    margin-bottom: 6px;
}

.jobs-mobile-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.jobs-mobile-modal-apply {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.jobs-mobile-modal-apply:hover {
    background: #1d4ed8;
}

body.modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .jobs-main-inner {
        grid-template-columns: 1fr;
        padding: 16px;
        max-width: 100%;
    }

    .jobs-listings-column {
        width: 100%;
        max-width: 100%;
    }

    .jobs-detail-column {
        display: none;
    }

    .jobs-card {
        cursor: pointer;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .jobs-card.active {
        background: #fff;
        border-color: #e5e7eb;
        border-left: 1px solid #e5e7eb;
    }
}

@media (max-width: 640px) {
    .jobs-search-section {
        padding: 16px;
    }

    .jobs-search-box {
        flex-direction: column;
        gap: 12px;
    }

    .jobs-input-group {
        flex-direction: column;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .jobs-input-wrapper {
        border-radius: 50px !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 8px;
    }

    .jobs-search-btn {
        width: 100%;
    }

    .jobs-main-inner {
        padding: 16px;
    }

    .jobs-listings-header {
        padding: 8px 0;
    }

    .jobs-card {
        padding: 14px 16px;
    }

    .jobs-card-title {
        white-space: normal;
        font-size: 14px;
    }
}
