/* ============================================
   MMC JML Form Widget Styles
   ============================================ */

.mmc-jml-form {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   STEP HEADERS
   ============================================ */

.mmc-jml-step-header {
    margin-bottom: 30px;
    text-align: center;
}

.mmc-jml-step-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mmc-jml-step-description {
    font-size: 16px;
    color: #e0e0e0;
    margin: 0;
}

/* ============================================
   TYPE SELECTION CARDS (Step 1)
   ============================================ */

.mmc-jml-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.mmc-jml-type-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mmc-jml-type-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.mmc-jml-type-card.selected {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.mmc-jml-type-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.type-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-card-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.mmc-jml-type-card[data-type="mover"] .type-card-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.mmc-jml-type-card[data-type="leaver"] .type-card-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.type-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px 0;
}

.type-card-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.type-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.type-card-features li {
    font-size: 13px;
    color: #4b5563;
    padding: 6px 0 6px 24px;
    position: relative;
}

.type-card-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.mmc-jml-select-type-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-select-type-btn:hover {
    background: #2563eb;
}

.mmc-jml-type-card[data-type="mover"] .mmc-jml-select-type-btn {
    background: #f59e0b;
}

.mmc-jml-type-card[data-type="mover"] .mmc-jml-select-type-btn:hover {
    background: #d97706;
}

.mmc-jml-type-card[data-type="leaver"] .mmc-jml-select-type-btn {
    background: #ef4444;
}

.mmc-jml-type-card[data-type="leaver"] .mmc-jml-select-type-btn:hover {
    background: #dc2626;
}

/* ============================================
   EMPLOYEE SELECTION (Step 2)
   ============================================ */

.mmc-jml-employee-search {
    margin-bottom: 24px;
}

.mmc-jml-search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.mmc-jml-search-box .dashicons {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mmc-jml-search-box .mmc-jml-input {
    padding-left: 48px;
    font-size: 16px;
}

.mmc-jml-employee-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.mmc-jml-employee-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.mmc-jml-employee-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-employee-card:hover {
    border-color: #3b82f6;
    background: #ffffff;
}

.mmc-jml-employee-card.selected {
    border-color: #10b981;
    background: #f0fdf4;
}

.employee-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-role {
    display: block;
    font-size: 13px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-department {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mmc-jml-select-employee-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mmc-jml-select-employee-btn:hover {
    color: #ffffff;
    background: #3b82f6;
}

.mmc-jml-employee-card.selected .mmc-jml-select-employee-btn {
    color: #ffffff;
    background: #10b981;
    border-color: #10b981;
}

/* Selected employee banner */
.mmc-jml-selected-employee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 10px;
    margin-bottom: 24px;
}

.selected-employee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-employee-info .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #10b981;
}

.selected-employee-details strong {
    display: block;
    font-size: 16px;
    color: #1e3a5f;
}

.selected-employee-details span {
    font-size: 13px;
    color: #6b7280;
}

.mmc-jml-change-employee-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-change-employee-btn:hover {
    color: #374151;
    border-color: #9ca3af;
}

/* Loading and no results states */
.mmc-jml-loading,
.mmc-jml-no-results,
.mmc-jml-error {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.mmc-jml-loading .dashicons,
.mmc-jml-no-results .dashicons,
.mmc-jml-error .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    display: block;
}

.mmc-jml-loading .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mmc-jml-error {
    color: #dc2626;
}

/* Step actions */
.mmc-jml-step-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.mmc-jml-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #10b981;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-continue-btn:hover:not(:disabled) {
    background: #059669;
}

.mmc-jml-continue-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.mmc-jml-continue-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ============================================
   BACK BUTTONS & NAVIGATION
   ============================================ */

.mmc-jml-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.mmc-jml-back-btn:hover {
    color: #374151;
    background: #f3f4f6;
    border-color: #d1d5db;
}

.mmc-jml-back-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Form header with type badge */
.mmc-jml-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    text-align: left;
}

.mmc-jml-request-type-badge {
    margin-left: auto;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
}

.type-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.type-badge.joiner {
    color: #1e40af;
    background: #dbeafe;
}

.type-badge.mover {
    color: #92400e;
    background: #fef3c7;
}

.type-badge.leaver {
    color: #991b1b;
    background: #fee2e2;
}

/* ============================================
   EDIT MODE NOTICE
   ============================================ */

.mmc-jml-edit-notice {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mmc-jml-edit-notice .edit-icon {
    font-size: 20px;
    color: #d97706;
}

.mmc-jml-edit-notice .edit-text {
    flex: 1;
}

.mmc-jml-edit-notice .edit-text strong {
    color: #92400e;
    font-weight: 600;
}

.mmc-jml-edit-notice .edit-text span {
    color: #78350f;
    font-size: 14px;
}

/* ============================================
   SECTION STYLING
   ============================================ */

.mmc-jml-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.mmc-jml-section:last-of-type {
    border-bottom: none;
}

.mmc-jml-section-title {
    color: #ffffff;
    background-color: #1e3a5f;
    font-size: 18px;
    font-weight: 600;
    margin: -10px -15px 25px -15px;
    padding: 15px 20px;
    border-radius: 6px;
}

.mmc-jml-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.mmc-jml-leaver-note,
.mmc-jml-description.mmc-jml-leaver-note,
p.mmc-jml-leaver-note {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #ef4444 !important;
    border-radius: 6px;
    padding: 12px 16px;
    color: #991b1b !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.mmc-jml-leaver-note .dashicons,
.mmc-jml-leaver-note .dashicons-warning {
    color: #ef4444 !important;
    font-size: 20px;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

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

.mmc-jml-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mmc-jml-field.full-width {
    grid-column: 1 / -1;
}

/* ============================================
   LABELS
   ============================================ */

.mmc-jml-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mmc-jml-label .required {
    color: #ef4444;
    font-weight: 700;
}

/* ============================================
   INPUT FIELDS
   ============================================ */

.mmc-jml-input,
.mmc-jml-select,
.mmc-jml-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mmc-jml-input:focus,
.mmc-jml-select:focus,
.mmc-jml-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mmc-jml-input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.mmc-jml-input.mmc-jml-error,
.mmc-jml-select.mmc-jml-error,
.mmc-jml-textarea.mmc-jml-error {
    border-color: #ef4444;
}

.mmc-jml-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   CHECKBOX GRIDS
   ============================================ */

.mmc-jml-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.mmc-jml-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-checkbox:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.mmc-jml-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.mmc-jml-checkbox span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.mmc-jml-checkbox input[type="checkbox"]:checked + span {
    color: #1e3a5f;
    font-weight: 600;
}

/* ============================================
   DOCUMENT LIST
   ============================================ */

.mmc-jml-documents {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mmc-jml-document {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-document:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.mmc-jml-document input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #10b981;
}

.mmc-jml-document span {
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.mmc-doc-download-btn {
    padding: 6px 16px;
    font-size: 13px;
    color: #3b82f6;
    background-color: transparent;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mmc-doc-download-btn:hover {
    color: #ffffff;
    background-color: #3b82f6;
}

/* ============================================
   COMPLIANCE DOCUMENTS
   ============================================ */

.mmc-jml-compliance-instructions {
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1e40af;
    line-height: 1.6;
}

.mmc-jml-compliance-instructions strong {
    color: #1e3a8a;
    display: block;
    margin-bottom: 8px;
}

.mmc-jml-compliance-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.mmc-jml-compliance-instructions li {
    margin-bottom: 4px;
}

.mmc-jml-compliance-docs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mmc-jml-compliance-item {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6b7280;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mmc-jml-compliance-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.mmc-jml-compliance-item.has-upload {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.mmc-jml-compliance-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.mmc-jml-compliance-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.mmc-jml-compliance-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
    flex-shrink: 0;
}

.mmc-jml-doc-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.mmc-jml-compliance-label input[type="checkbox"]:checked + .mmc-jml-doc-name {
    color: #059669;
    font-weight: 600;
}

.mmc-jml-compliance-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mmc-jml-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.mmc-jml-doc-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Download button - Blue */
.mmc-jml-doc-download {
    color: #3b82f6;
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
}

.mmc-jml-doc-download:hover {
    background-color: #3b82f6;
    color: #ffffff;
    text-decoration: none;
}

/* Upload button - Green */
.mmc-jml-doc-upload {
    color: #059669;
    background-color: #ecfdf5;
    border: 1px solid #10b981;
}

.mmc-jml-doc-upload:hover {
    background-color: #10b981;
    color: #ffffff;
}

/* Upload status row */
.mmc-jml-upload-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background-color: #dcfce7;
    border-radius: 4px;
    font-size: 13px;
    color: #166534;
}

.mmc-jml-upload-status .dashicons-yes-alt {
    color: #16a34a;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mmc-jml-upload-filename {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mmc-jml-remove-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background-color: transparent;
    color: #dc2626;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mmc-jml-remove-upload:hover {
    background-color: #fee2e2;
}

.mmc-jml-remove-upload .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Compliance item when checked - visual feedback */
.mmc-jml-compliance-item:has(input[type="checkbox"]:checked) {
    border-left-color: #10b981;
}

.mmc-jml-compliance-item:has(input[type="checkbox"]:checked):not(.has-upload) {
    background-color: #fefce8;
    border-left-color: #eab308;
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.mmc-jml-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.mmc-jml-submit,
.mmc-jml-draft {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmc-jml-submit {
    color: #ffffff;
    background-color: #10b981;
}

.mmc-jml-submit:hover {
    background-color: #059669;
}

.mmc-jml-submit:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.mmc-jml-draft {
    color: #ffffff;
    background-color: #6b7280;
}

.mmc-jml-draft:hover {
    background-color: #4b5563;
}

.mmc-jml-draft:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* ============================================
   STATUS MESSAGES
   ============================================ */

.mmc-jml-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.mmc-jml-message.success {
    color: #065f46;
    background-color: #d1fae5;
    border: 1px solid #34d399;
}

.mmc-jml-message.error {
    color: #991b1b;
    background-color: #fee2e2;
    border: 1px solid #f87171;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .mmc-jml-type-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .mmc-jml-checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mmc-jml-employee-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mmc-jml-form {
        padding: 20px;
    }

    .mmc-jml-type-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mmc-jml-type-card {
        padding: 24px 20px;
    }

    .mmc-jml-step-title {
        font-size: 24px;
    }

    .mmc-jml-grid {
        grid-template-columns: 1fr;
    }

    .mmc-jml-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .mmc-jml-documents {
        grid-template-columns: 1fr;
    }

    .mmc-jml-section-title {
        font-size: 16px;
        margin: -5px -10px 20px -10px;
        padding: 12px 15px;
    }

    .mmc-jml-actions {
        flex-direction: column;
    }

    .mmc-jml-submit,
    .mmc-jml-draft {
        width: 100%;
    }

    .mmc-jml-document {
        flex-wrap: wrap;
    }

    .mmc-doc-download-btn {
        width: 100%;
        margin-top: 10px;
    }

    .mmc-jml-compliance-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mmc-jml-compliance-label {
        width: 100%;
    }

    .mmc-jml-compliance-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .mmc-jml-doc-btn {
        flex: 1;
        justify-content: center;
    }

    .mmc-jml-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .mmc-jml-request-type-badge {
        margin-left: 0;
    }

    .mmc-jml-selected-employee {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .selected-employee-info {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .mmc-jml-form {
        padding: 15px;
    }

    .mmc-jml-section {
        margin-bottom: 30px;
    }

    .mmc-jml-step-title {
        font-size: 20px;
    }

    .type-card-icon {
        width: 48px;
        height: 48px;
    }

    .type-card-icon .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
}

/* ========================================
   SharePoint & Teams Sites Section
   ======================================== */

.mmc-jml-subsection {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.mmc-jml-subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mmc-jml-subsection-title .dashicons {
    color: #038387;
    font-size: 20px;
}

/* Sites Filter Bar */
.mmc-sites-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mmc-sites-filter .mmc-jml-input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.mmc-sites-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.mmc-btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
}

.mmc-btn-link:hover {
    color: #1d4ed8;
}

.mmc-separator {
    color: #d1d5db;
}

.mmc-sites-count {
    color: #6b7280;
}

#selected-sites-count {
    font-weight: 600;
    color: #3b82f6;
}

/* Sites Grid */
.mmc-sites-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
    max-height: 400px;
    overflow-y: auto;
    overflow-anchor: none; /* Prevent scroll anchoring */
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    scroll-behavior: auto; /* Prevent smooth scroll on focus */
}

.mmc-site-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    user-select: none;
}

.mmc-site-item:hover {
    background: #f3f4f6;
}

.mmc-site-item:has(input:checked) {
    background: #eff6ff;
}

/* Hidden native checkbox */
.mmc-site-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox */
.mmc-site-checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
}

.mmc-site-item input:checked + .mmc-site-checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.mmc-site-checkmark::after {
    content: '';
    display: none;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.mmc-site-item input:checked + .mmc-site-checkmark::after {
    display: block;
}

.mmc-site-item:hover .mmc-site-checkmark {
    border-color: #3b82f6;
}

/* Site Name */
.mmc-site-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.3;
    word-break: break-word;
}

.mmc-site-item:has(input:checked) .mmc-site-name {
    color: #1e40af;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .mmc-sites-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .mmc-sites-grid-wrapper {
        grid-template-columns: 1fr;
    }
}

.mmc-no-sites-message {
    color: #6b7280;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .mmc-sites-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .mmc-sites-filter .mmc-jml-input {
        max-width: none;
    }

    .mmc-sites-table .col-type {
        display: none;
    }

    .mmc-sites-table-wrapper {
        max-height: 300px;
    }
}
