/**
 * FZ Jobs Integration - Styles
 * Mimics Elementor list style with accordion functionality
 */

.fz-jobs-container {
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
}

.fz-jobs-list {
    margin-bottom: 20px;
}

.fz-jobs-list ul.fz-jobs-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Job Item */
.fz-job-item {
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.fz-job-item:last-child {
    border-bottom: none;
}

.fz-job-item.active {
    background: #f0fdf4;
}

/* Job Header (clickable) */
.fz-job-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.fz-job-header:hover {
    background: #f9fafb;
}

.fz-job-item.active .fz-job-header {
    background: #f0fdf4;
}

/* Bullet Icon */
.fz-job-bullet {
    color: #f59e0b;
    font-weight: bold;
    margin-right: 16px;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease;
    display: inline-block;
    min-width: 20px;
}

.fz-job-item.active .fz-job-bullet {
    transform: rotate(45deg);
    color: #10b981;
}

/* Job Title and Meta */
.fz-job-title-wrapper {
    flex: 1;
}

.fz-job-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.fz-job-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.fz-job-type,
.fz-job-location,
.fz-job-department {
    color: #6b7280;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fz-job-type {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.fz-job-type.stage {
    background: #fef3c7;
    color: #92400e;
}

.fz-job-type.cdi {
    background: #dcfce7;
    color: #166534;
}

.fz-job-type.cdd {
    background: #e0e7ff;
    color: #3730a3;
}

/* Expand Icon */
.fz-job-expand-icon {
    margin-left: auto;
    color: #9ca3af;
    transition: transform 0.3s ease;
    font-size: 18px;
}

.fz-job-item.active .fz-job-expand-icon {
    transform: rotate(180deg);
    color: #10b981;
}

/* Job Details (accordion content) */
.fz-job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.fz-job-item.active .fz-job-details {
    max-height: 1000px;
    padding: 24px 20px 24px 56px; /* Left padding to align with title */
}

.fz-job-description {
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.fz-job-requirements {
    margin-bottom: 20px;
}

.fz-job-requirements h4 {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fz-job-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fz-job-requirements li {
    padding-left: 24px;
    margin-bottom: 8px;
    position: relative;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.fz-job-requirements li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.fz-job-salary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef3c7;
    color: #92400e;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.fz-job-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.fz-job-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.fz-job-apply-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
}

.fz-job-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fz-job-share-btn:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Footer */
.fz-jobs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.fz-jobs-count {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.fz-refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fz-refresh-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.fz-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.fz-refresh-btn svg {
    width: 16px;
    height: 16px;
}

.fz-refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.fz-jobs-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.fz-jobs-empty svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

.fz-jobs-empty h3 {
    color: #374151;
    font-size: 18px;
    margin: 0 0 8px 0;
}

.fz-jobs-empty p {
    margin: 0;
    font-size: 14px;
}

/* Loading State */
.fz-jobs-loading {
    text-align: center;
    padding: 60px 20px;
}

.fz-jobs-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .fz-jobs-container {
        padding: 16px;
    }

    .fz-job-header {
        padding: 14px 16px;
    }

    .fz-job-item.active .fz-job-details {
        padding: 20px 16px 20px 40px;
    }

    .fz-job-title {
        font-size: 15px;
    }

    .fz-job-meta {
        flex-direction: column;
        gap: 6px;
    }

    .fz-jobs-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .fz-refresh-btn {
        width: 100%;
        justify-content: center;
    }

    .fz-job-actions {
        flex-direction: column;
    }

    .fz-job-apply-btn,
    .fz-job-share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .fz-refresh-btn,
    .fz-job-share-btn {
        display: none;
    }

    .fz-job-details {
        max-height: none !important;
        padding: 20px !important;
    }

    .fz-job-item {
        page-break-inside: avoid;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .fz-jobs-container {
        background: #1f2937;
    }

    .fz-job-item {
        border-bottom-color: #374151;
    }

    .fz-job-header:hover {
        background: #374151;
    }

    .fz-job-title {
        color: #f9fafb;
    }

    .fz-job-details {
        background: #111827;
        border-top-color: #374151;
    }

    .fz-job-description,
    .fz-job-requirements li {
        color: #d1d5db;
    }

    .fz-job-requirements h4 {
        color: #f9fafb;
    }
}

/* Add to your existing fz-jobs.css file */

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.8;
    color: #374151;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: #1f2937;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.markdown-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.markdown-content h2 {
    font-size: 20px;
}

.markdown-content h3 {
    font-size: 18px;
}

.markdown-content h4 {
    font-size: 16px;
}

.markdown-content p {
    margin-bottom: 16px;
}

.markdown-content ul,
.markdown-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.markdown-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content ol li {
    list-style-type: decimal;
}

.markdown-content strong,
.markdown-content b {
    font-weight: 600;
    color: #1f2937;
}

.markdown-content em,
.markdown-content i {
    font-style: italic;
}

.markdown-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #dc2626;
}

.markdown-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 14px;
}

.markdown-content blockquote {
    border-left: 4px solid #10b981;
    padding-left: 16px;
    margin: 16px 0;
    color: #6b7280;
    font-style: italic;
}

.markdown-content a {
    color: #10b981;
    text-decoration: underline;
    transition: color 0.2s;
}

.markdown-content a:hover {
    color: #059669;
}

.markdown-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 24px 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.markdown-content table th {
    background: #f9fafb;
    font-weight: 600;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

/* First paragraph styling */
.markdown-content > p:first-child {
    font-size: 16px;
    color: #1f2937;
}