/**
 * Inspector Manager Admin Styles
 */

/* Zone select fields */
.im-zone-select {
    width: 100% !important;
    min-width: 300px !important;
}

/* Add inspector form */
.im-add-form {
    max-width: 600px !important;
    margin-top: 20px !important;
}

/* Required field indicator */
.im-required {
    color: red !important;
}

/* Description with margin */
.im-description-spaced {
    margin-bottom: 10px !important;
}

/* Inspector status badges */
.im-status-approved {
    color: #22c55e !important;
    font-weight: 600 !important;
}

.im-status-pending {
    color: #f59e0b !important;
    font-weight: 600 !important;
}

/* Password form messages */
.jobsearch-password-error,
.jobsearch-password-success {
    display: none !important;
}

/* Reports section */
.inspector-no-reports-message {
    text-align: center !important;
    padding: 40px !important;
    color: #666 !important;
}

.inspector-no-reports-icon {
    font-size: 48px !important;
    display: block !important;
    margin-bottom: 20px !important;
    opacity: 0.3 !important;
}

/* Reports filter */
.inspector-reports-filter {
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
}

.inspector-reports-filter form {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
}

.inspector-reports-filter label {
    font-weight: 500 !important;
}

.inspector-reports-filter select {
    padding: 8px 12px !important;
    border: 1px solid #ffffff !important;
    border-radius: 6px !important;
    min-width: 250px;
    cursor: pointer;
    background: #ffffff !important;
}

.inspector-reports-filter select:hover {
    border-color: #3b82f6 !important;
}

.inspector-reports-filter .button-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px !important;
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    border-radius: 6px !important;
    font-size: 13px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.inspector-reports-filter .button-reset:hover {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
}

.inspector-reports-filter .button-reset svg {
    width: 14px;
    height: 14px;
}

/* Matricule sections */
.matricule-section {
    margin-bottom: 30px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.matricule-header {
    background: #f3f4f6 !important;
    padding: 15px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.matricule-header h3 {
    margin: 0 !important;
    color: #374151 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.reports-table-container .wp-list-table {
    margin: 0 !important;
}

/* Report type badge */
.im-badge-pdf {
    background: #ef4444 !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
}

.im-badge-other {
    background: #3b82f6 !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
}

/* Action buttons */
.im-btn-download {
    margin-right: 5px !important;
}

.im-btn-delete {
    background: #dc2626 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

/* Reports summary */
.inspector-reports-summary {
    margin-top: 20px !important;
    padding: 15px !important;
    background: #f0f9ff !important;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 4px !important;
}

.inspector-reports-summary-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

.inspector-reports-summary-count {
    color: #6b7280 !important;
    font-size: 14px !important;
}

/* PDF template styles */
.im-pdf-list-indent {
    text-indent: 20px !important;
}

.im-pdf-image {
    max-width: 400px !important;
    max-height: 250px !important;
    margin: 10px 0 !important;
}

.im-matricule-group {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
}

.im-group-header {
    background: #f9fafb;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.im-group-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.im-header-matricule {
    color: #888;
    font-weight: normal;
    font-size: 14px;
}

.im-count-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.im-reports-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.im-report-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.im-report-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.im-report-icon {
    font-size: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.im-report-info {
    flex-grow: 1;
    min-width: 0;
}

.im-report-filename {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-report-meta {
    font-size: 12px;
    color: #777;
    display: flex;
    gap: 15px;
}

.im-report-meta i {
    font-size: 12px;
    margin-right: 3px;
}

.im-report-action .im-download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f8f9fa;
    color: #333;
    border-radius: 50%;
    transition: all 0.2s;
}

.im-report-action .im-download-link:hover {
    background: #3498db;
    color: #fff;
}


.im-filter-form {
    margin-bottom: 20px;
}

.im-filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#matricule-filter,
#company-filter {
    flex-grow: 1;
    max-width: 400px;
}

/* New Report Cards Layout */
.matricule-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.matricule-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.reports-count {
    font-size: 13px;
    color: #64748b;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.reports-cards-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.report-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 8px;
}

.report-card-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-card-filename {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-card-meta {
    font-size: 12px;
    color: #64748b;
}

.report-card-download {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.report-card-download:hover {
    background: #3b82f6;
    color: #ffffff !important;
    transform: scale(1.05);
}

.report-card-download svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .report-card {
        padding: 12px;
        gap: 12px;
    }

    .report-card-icon {
        width: 40px;
        height: 40px;
    }

    .report-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .report-card-download {
        width: 36px;
        height: 36px;
    }
}

/* Pagination Styles */
.pagination-summary {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b;
}

.report-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #3b82f6;
    color: #ffffff !important;
    border-color: #3b82f6;
}

.company-pagination {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.pagination-num:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-num.current {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.pagination-dots {
    color: #94a3b8;
    padding: 0 4px;
}

.pagination-prev,
.pagination-next {
    padding: 10px 20px;
}

/* Responsive pagination */
@media (max-width: 600px) {
    .company-pagination {
        padding: 16px;
    }

    .pagination-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination-numbers {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .pagination-prev {
        order: 0;
    }

    .pagination-next {
        order: 2;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pagination-num {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .report-pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== Employer Reports Shortcode Styles ===== */
.im-reports-wrapper {
    width: 100%;
    padding: 0;
}

.im-reports-header {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.im-reports-header h2 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.im-report-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.im-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 28px;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 280px;
}

.im-report-btn:hover {
    background: #00a7c0;
    color: #fff;
    border-color: #00a7c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 167, 192, 0.25);
}

.im-report-btn.active {
    background: #00a7c0;
    color: #fff;
    border-color: #00a7c0;
    box-shadow: 0 4px 12px rgba(0, 167, 192, 0.25);
}

.im-report-btn i {
    margin-right: 12px;
    font-size: 18px;
}

.im-no-selection {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 50px 30px;
    text-align: center;
}

.im-no-selection i {
    font-size: 50px;
    color: #00a7c0;
    display: block;
    margin-bottom: 20px;
}

.im-no-selection h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.im-no-selection p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.im-passage-placeholder {
    background: #fff;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.im-passage-placeholder h2 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #333;
}

.im-passage-placeholder p {
    margin: 0;
    color: #666;
}

/* Draft cards styles */
.im-drafts-section {
    margin-top: 30px;
}

.im-drafts-header {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.im-drafts-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.im-drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.im-draft-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #00a7c0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.im-draft-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.im-draft-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.im-draft-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.im-draft-date {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.im-draft-content {
    margin-bottom: 15px;
}

.im-draft-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.im-draft-info strong {
    color: #333;
}

.im-draft-actions {
    display: flex;
    gap: 10px;
}

.im-draft-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.im-draft-btn-edit {
    background: #00a7c0;
    color: white;
}

.im-draft-btn-edit:hover {
    background: #008ba3;
}

.im-draft-btn-delete {
    background: #dc3545;
    color: white;
}

.im-draft-btn-delete:hover {
    background: #c82333;
}

.im-no-drafts {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #666;
}

/* Back button styles */
.im-form-back-button {
    margin-bottom: 20px;
}

.im-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.im-back-link:hover {
    background: #e9ecef;
    color: #000;
    transform: translateX(-4px);
}

.im-back-link i {
    font-size: 14px;
}

/* Responsive for employer reports */
@media (max-width: 768px) {
    .im-report-buttons {
        flex-direction: column;
    }

    .im-report-btn {
        min-width: 100%;
        justify-content: center;
    }

    .im-reports-header {
        padding: 20px 15px;
    }

    .im-no-selection {
        padding: 35px 20px;
    }
}

/* ===== Disabled Button Styles ===== */
/* General disabled button styles */
button:disabled,
button[disabled],
input[type="submit"]:disabled,
input[type="submit"][disabled],
.jobsearch-employer-profile-submit:disabled,
.jobsearch-employer-profile-submit[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Specific button types when disabled */
.im-report-btn:disabled,
.im-report-btn[disabled] {
    opacity: 0.5 !important;
    background: #e0e0e0 !important;
    color: #9e9e9e !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
}

.im-draft-btn:disabled,
.im-draft-btn[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    filter: grayscale(50%);
}

.im-draft-btn-edit:disabled,
.im-draft-btn-edit[disabled] {
    background: #b0d4db !important;
    color: #e8f4f7 !important;
}

.im-draft-btn-delete:disabled,
.im-draft-btn-delete[disabled] {
    background: #f5c6cb !important;
    color: #f8d7da !important;
}

/* Pagination buttons disabled */
.pagination-btn:disabled,
.pagination-btn[disabled],
.page-btn:disabled,
.page-btn[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: #f1f5f9 !important;
    color: #cbd5e1 !important;
    border-color: #e2e8f0 !important;
}

/* Report form action buttons disabled */
#save-draft-btn:disabled,
#delete-draft-btn:disabled,
#submit-report-btn:disabled {
    opacity: 0.6 !important;
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Loading state for buttons */
button.loading,
.im-report-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none !important;
}

button.loading::after,
.im-report-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-spin 0.6s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}