/**
 * Jobs Styles
 * Byark Starter UI
 */

/* General Wrapper */
.byark-jobs-wrapper {
    width: 100%;
}

/* Header Styles */
.byark-jobs-header {
    margin-bottom: 40px;
    text-align: center;
}

.byark-jobs-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.byark-jobs-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layout */
.byark-jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* List Layout */
.byark-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.byark-jobs-list .byark-job-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.byark-jobs-list .byark-job-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.byark-jobs-list .byark-job-title {
    flex: 1;
    min-width: 200px;
}

.byark-jobs-list .byark-job-meta {
    flex: 1;
    justify-content: center;
}

.byark-jobs-list .byark-job-footer {
    margin-top: 0;
}

/* Job Card */
.byark-job-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.byark-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Job Title */
.byark-job-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.byark-job-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.byark-job-title a:hover {
    color: var(--ast-global-color-0, #0066cc);
}

/* Job Meta */
.byark-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.byark-job-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.byark-job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
}

.byark-job-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Job Excerpt */
.byark-job-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Job Footer */
.byark-job-footer {
    margin-top: 16px;
}

.byark-job-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background-color: var(--ast-global-color-0, var(--ast-global-color-0, #0066cc));
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.byark-job-button:hover {
    background-color: var(--ast-global-color-1, var(--ast-global-color-1, #0052a3));
    color: #fff;
    transform: translateY(-1px);
}

/* Empty State */
.byark-jobs-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.byark-jobs-empty p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* ============================================
   Job Details Widget
   ============================================ */

.byark-job-detail-wrapper {
    max-width: 900px;
}

.byark-job-detail-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

/* Meta Box */
.byark-job-detail-meta {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.byark-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.byark-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.byark-meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--ast-global-color-0, var(--ast-global-color-0, #0066cc));
}

.byark-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.byark-meta-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.byark-meta-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* Job Sections */
.byark-job-section {
    margin-bottom: 32px;
}

.byark-job-section-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.byark-job-section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.byark-job-description p {
    margin-bottom: 16px;
}

.byark-job-list {
    list-style: disc;
    padding: 0;
    margin: 0;
}

.byark-job-list li {
    position: relative;
    padding-right: 28px;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* .byark-job-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--ast-global-color-0, var(--ast-global-color-0, #0066cc));
    border-radius: 50%;
} */

/* RTL adjustments for list */
[dir="rtl"] .byark-job-list li,
.rtl .byark-job-list li {
    padding-right: 28px;
    padding-left: 0;
}

[dir="rtl"] .byark-job-list li::before,
.rtl .byark-job-list li::before {
    right: 0;
    left: auto;
}

/* LTR adjustments */
[dir="ltr"] .byark-job-list li,
body:not(.rtl) .byark-job-list li {
    padding-left: 28px;
    padding-right: 0;
}

[dir="ltr"] .byark-job-list li::before,
body:not(.rtl) .byark-job-list li::before {
    left: 0;
    right: auto;
}

.byark-job-list li::marker {
    color: #d4af37;
}

/* ============================================
   Application Form
   ============================================ */

.byark-job-application-form {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
}

.byark-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.byark-application-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.byark-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.byark-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.byark-form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.byark-form-label .required {
    color: #e53935;
}

.byark-form-input,
.byark-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.byark-form-input:focus,
.byark-form-textarea:focus {
    outline: none;
    border-color: var(--ast-global-color-0, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.byark-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.byark-form-submit {
    margin-top: 8px;
}

.byark-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: var(--ast-global-color-0, #0066cc);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.byark-submit-button:hover {
    background-color: var(--ast-global-color-1, #0052a3);
    transform: translateY(-1px);
}

.byark-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.byark-submit-button .spinner {
    animation: byark-spin 1s linear infinite;
}

@keyframes byark-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Form Messages */
.byark-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.byark-form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.byark-form-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Success State */
.byark-success-message {
    text-align: center;
    padding: 40px 20px;
}

.byark-success-message svg {
    margin-bottom: 16px;
}

.byark-success-message p {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

/* Job Closed */
.byark-job-closed {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 40px;
}

.byark-job-closed p {
    font-size: 1rem;
    color: #e65100;
    margin: 0;
}

/* Job Not Found */
.byark-job-not-found {
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #666;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 991px) {
    .byark-jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .byark-job-detail-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .byark-jobs-grid {
        grid-template-columns: 1fr;
    }

    .byark-jobs-list .byark-job-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .byark-jobs-list .byark-job-meta {
        justify-content: flex-start;
    }

    .byark-jobs-title {
        font-size: 2rem;
    }

    .byark-job-detail-title {
        font-size: 1.5rem;
    }

    .byark-meta-grid {
        grid-template-columns: 1fr;
    }

    .byark-form-row {
        grid-template-columns: 1fr;
    }

    .byark-job-application-form {
        padding: 24px;
    }
}

/* ============================================
   RTL Support
   ============================================ */

[dir="rtl"] .byark-job-meta-item,
.rtl .byark-job-meta-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .byark-meta-item,
.rtl .byark-meta-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .byark-meta-text,
.rtl .byark-meta-text {
    text-align: right;
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    .byark-job-card,
    .byark-job-button,
    .byark-submit-button,
    .byark-form-input,
    .byark-form-textarea {
        transition: none;
    }

    .byark-job-card:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .byark-job-card {
        border: 2px solid #000;
    }

    .byark-job-button,
    .byark-submit-button {
        border: 2px solid #000;
    }

    .byark-form-input,
    .byark-form-textarea {
        border: 2px solid #000;
    }
}

/* Focus Styles */
.byark-job-title a:focus,
.byark-job-button:focus,
.byark-submit-button:focus {
    outline: 2px solid var(--ast-global-color-0, #0066cc);
    outline-offset: 2px;
}