/* Meta Documentation & SEO Manager - Admin Styles */

/* ===========================
   Main Container
   =========================== */
.mdsm-admin-wrap {
    margin: 20px 20px 20px 0;
    background: #f0f0f1;
    border-radius: 8px;
    padding: 0;
}

.mdsm-page-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin: 0;
    padding: 30px 40px;
    border-radius: 8px 8px 0 0;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mdsm-page-title .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.mdsm-header-info {
    background: #fff;
    padding: 20px 40px;
    border-bottom: 1px solid #e0e0e0;
}

.mdsm-description {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* ===========================
   Search Bar
   =========================== */
.mdsm-search-bar {
    background: #fff;
    padding: 20px 40px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.mdsm-search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mdsm-search-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mdsm-search-icon {
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 20px;
    pointer-events: none;
}

/* ===========================
   Tabs
   =========================== */
.mdsm-tabs {
    background: #fff;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
}

.mdsm-tab-button {
    background: transparent;
    border: none;
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
}

.mdsm-tab-button:hover {
    color: #667eea;
    background: #f5f5f5;
}

.mdsm-tab-button.active {
    color: #667eea;
    background: transparent;
}

.mdsm-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
    border-radius: 3px 3px 0 0;
}

.mdsm-tab-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mdsm-badge {
    background: #667eea;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.mdsm-tab-button.active .mdsm-badge {
    background: #764ba2;
}

/* ===========================
   Tab Content
   =========================== */
.mdsm-tab-content {
    display: none;
    background: #fff;
    padding: 40px;
    border-radius: 0 0 8px 8px;
    animation: fadeIn 0.3s ease;
}

.mdsm-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mdsm-section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.mdsm-section-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.mdsm-section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ===========================
   Category Sections
   =========================== */
.mdsm-category {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.mdsm-category-header {
    background: linear-gradient(to right, #f8f9fa, #fff);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mdsm-category-header:hover {
    background: linear-gradient(to right, #f0f1f2, #f8f9fa);
}

.mdsm-category-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mdsm-category-header .dashicons {
    color: #667eea;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.mdsm-collapse-toggle {
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #999;
    transition: transform 0.3s ease, color 0.3s ease;
}

.mdsm-collapse-toggle:hover {
    color: #667eea;
}

.mdsm-collapse-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.mdsm-category.collapsed .mdsm-collapse-toggle {
    transform: rotate(-90deg);
}

.mdsm-category.collapsed .mdsm-category-content {
    display: none;
}

.mdsm-category-content {
    padding: 25px;
    background: #fff;
}

/* ===========================
   File Grid
   =========================== */
.mdsm-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.mdsm-file-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.mdsm-file-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.mdsm-file-card.mdsm-file-card-large {
    grid-column: span 2;
}

.mdsm-file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.mdsm-file-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}

.mdsm-file-icon {
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mdsm-file-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    word-break: break-word;
}

.mdsm-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mdsm-status-exists {
    background: #d4edda;
    color: #155724;
}

.mdsm-status-empty {
    background: #f8f9fa;
    color: #999;
}

.mdsm-edit-button {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mdsm-edit-button:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.mdsm-edit-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mdsm-file-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 40px;
}

.mdsm-file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
    gap: 15px;
    flex-wrap: wrap;
}

.mdsm-warning-notice {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #856404;
}

.mdsm-warning-notice .dashicons {
    color: #ff9800;
    margin-right: 5px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.mdsm-warning-notice strong {
    color: #721c24;
}

.mdsm-warning-notice code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.mdsm-warning-notice small {
    display: block;
    margin-top: 8px;
    opacity: 0.9;
}

.mdsm-file-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 12px;
}

.mdsm-file-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mdsm-file-actions {
    display: flex;
    gap: 10px;
}

.mdsm-view-link,
.mdsm-copy-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mdsm-view-link {
    background: #f0f0f1;
    color: #667eea;
    border: 1px solid #e0e0e0;
}

.mdsm-view-link:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.mdsm-copy-link {
    background: transparent;
    color: #999;
    border: 1px solid #e0e0e0;
}

.mdsm-copy-link:hover {
    background: #f0f0f1;
    color: #667eea;
    border-color: #667eea;
}

.mdsm-view-link .dashicons,
.mdsm-copy-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ===========================
   Sitemap Panel
   =========================== */
.mdsm-sitemap-panel {
    max-width: 900px;
}

.mdsm-sitemap-status {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.mdsm-sitemap-status-empty {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.mdsm-status-icon {
    font-size: 48px;
    color: #28a745;
}

.mdsm-sitemap-status-empty .mdsm-status-icon {
    color: #ffc107;
}

.mdsm-status-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.mdsm-status-info {
    flex: 1;
}

.mdsm-status-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #333;
}

.mdsm-status-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.mdsm-sitemap-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.mdsm-sitemap-meta a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mdsm-sitemap-meta a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.mdsm-sitemap-options {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.mdsm-sitemap-options h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.mdsm-option-group {
    margin-bottom: 25px;
}

.mdsm-radio-label,
.mdsm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.mdsm-radio-label:hover,
.mdsm-checkbox-label:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.mdsm-radio-label input[type="radio"],
.mdsm-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mdsm-radio-content,
.mdsm-checkbox-content {
    flex: 1;
}

.mdsm-radio-content strong,
.mdsm-checkbox-content strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 15px;
}

.mdsm-radio-content p,
.mdsm-checkbox-content p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.mdsm-button-group {
    margin-top: 25px;
}

.button-hero {
    padding: 15px 30px !important;
    font-size: 16px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.button-hero .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ===========================
   Modal
   =========================== */
.mdsm-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.mdsm-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdsm-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mdsm-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8f9fa, #fff);
}

.mdsm-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.mdsm-modal-close {
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.mdsm-modal-close:hover {
    color: #667eea;
    background: #f0f0f1;
}

.mdsm-modal-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.mdsm-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.mdsm-editor-info {
    margin-bottom: 20px;
}

.mdsm-editor-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.mdsm-editor-meta {
    color: #999;
    font-size: 13px;
}

.mdsm-editor-textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.mdsm-editor-textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mdsm-editor-help {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.mdsm-editor-help p {
    margin: 0;
    color: #856404;
    font-size: 13px;
}

.mdsm-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

/* ===========================
   Toast Notifications
   =========================== */
.mdsm-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    display: none;
    animation: slideInRight 0.3s ease;
}

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

.mdsm-toast.active {
    display: block;
}

.mdsm-toast.success {
    background: #28a745;
}

.mdsm-toast.error {
    background: #dc3545;
}

/* ===========================
   Hidden Elements
   =========================== */
.mdsm-file-card.hidden {
    display: none;
}

/* ===========================
   Responsive Design
   =========================== */
@media screen and (max-width: 1200px) {
    .mdsm-file-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .mdsm-file-card.mdsm-file-card-large {
        grid-column: span 1;
    }
}

@media screen and (max-width: 782px) {
    .mdsm-page-title {
        padding: 20px 25px;
        font-size: 24px;
    }
    
    .mdsm-header-info,
    .mdsm-search-bar,
    .mdsm-tabs,
    .mdsm-tab-content {
        padding: 15px 20px;
    }
    
    .mdsm-file-grid {
        grid-template-columns: 1fr;
    }
    
    .mdsm-tabs {
        padding: 0 12px;
        gap: 2px;
    }

    .mdsm-tab-button {
        padding: 10px 12px;
        font-size: 12.5px;
    }
    
    .mdsm-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .mdsm-file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* Mobile responsive file action buttons */
    .mdsm-file-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    
    .mdsm-view-link,
    .mdsm-copy-link,
    .mdsm-copy-html-link,
    .mdsm-generate-html {
        font-size: 12px;
        padding: 10px 8px;
        justify-content: center;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        min-height: 40px;
    }
    
    .mdsm-view-link .dashicons,
    .mdsm-copy-link .dashicons,
    .mdsm-copy-html-link .dashicons,
    .mdsm-generate-html .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small screens - optimize button layout further */
    .mdsm-file-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .mdsm-view-link,
    .mdsm-copy-link,
    .mdsm-copy-html-link,
    .mdsm-generate-html {
        font-size: 11px;
        padding: 9px 6px;
        gap: 4px;
    }
}

/* ===========================
   HTML Link Buttons
   =========================== */
.mdsm-html-link {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    border-color: #11998e !important;
}

.mdsm-html-link:hover {
    background: linear-gradient(135deg, #0d7a6f 0%, #2ecc68 100%) !important;
    transform: translateY(-1px);
}

.mdsm-copy-html-link {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mdsm-copy-html-link:hover {
    background: linear-gradient(135deg, #0d7a6f 0%, #2ecc68 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.mdsm-copy-html-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mdsm-generate-html {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mdsm-generate-html:hover {
    background: linear-gradient(135deg, #e07aeb 0%, #e04358 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.mdsm-generate-html:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mdsm-generate-html .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===========================
   Public Document Index Styles
   =========================== */
.mdsm-public-index-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.mdsm-index-mode-section,
.mdsm-page-config-section,
.mdsm-shortcode-info-section,
.mdsm-document-selection-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.mdsm-index-mode-section:last-child,
.mdsm-page-config-section:last-child,
.mdsm-shortcode-info-section:last-child,
.mdsm-document-selection-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.mdsm-public-index-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mdsm-section-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Form elements */
.mdsm-form-group {
    margin-bottom: 20px;
}

.mdsm-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.mdsm-text-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.mdsm-text-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mdsm-select-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.mdsm-select-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mdsm-select-input:hover {
    border-color: #d0d0d0;
}

.mdsm-form-help {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.mdsm-form-help code {
    background: #fff;
    padding: 2px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
}

/* Index preview */
.mdsm-index-preview {
    margin-top: 15px;
}

.mdsm-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mdsm-preview-link:hover {
    background: #764ba2;
    color: #fff;
}

.mdsm-preview-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Shortcode box */
.mdsm-shortcode-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
}

.mdsm-shortcode-code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    color: #667eea;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 3px;
}

.mdsm-copy-shortcode {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mdsm-copy-shortcode:hover {
    background: #764ba2;
}

.mdsm-copy-shortcode .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Document selection */
.mdsm-index-category {
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.mdsm-index-category .mdsm-category-header {
    background: linear-gradient(to right, #f8f9fa, #fff);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 0;
    border: none;
}

.mdsm-index-category .mdsm-category-header:hover {
    background: linear-gradient(to right, #f0f1f2, #f8f9fa);
}

.mdsm-index-category-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mdsm-index-category-title .dashicons {
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mdsm-index-category .mdsm-collapse-toggle {
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #999;
    transition: transform 0.3s ease, color 0.3s ease;
}

.mdsm-index-category .mdsm-collapse-toggle:hover {
    color: #667eea;
}

.mdsm-index-category .mdsm-collapse-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.mdsm-index-category.collapsed .mdsm-collapse-toggle {
    transform: rotate(-90deg);
}

.mdsm-index-category.collapsed .mdsm-category-content {
    display: none;
}

.mdsm-index-category .mdsm-category-content {
    padding: 20px;
}

.mdsm-index-file-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mdsm-index-file-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mdsm-index-file-row:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.mdsm-file-disabled {
    opacity: 0.5;
}

.mdsm-file-checkbox-group {
    display: flex;
    align-items: center;
}

.mdsm-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mdsm-checkbox-inline input[type="checkbox"] {
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.mdsm-checkbox-inline input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.mdsm-file-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.mdsm-file-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mdsm-status-available {
    background: #d4edda;
    color: #155724;
}

.mdsm-status-missing {
    background: #f8d7da;
    color: #721c24;
}

.mdsm-file-description-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-left: 26px;
}

.mdsm-description-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.mdsm-description-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.mdsm-description-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.mdsm-input-hint {
    color: #777;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
}

/* Responsive for public index */
@media screen and (max-width: 782px) {
    .mdsm-text-input {
        max-width: 100%;
    }
    
    .mdsm-shortcode-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mdsm-copy-shortcode {
        justify-content: center;
    }
    
    .mdsm-file-description-group {
        padding-left: 0;
    }
    
    .mdsm-public-index-panel {
        padding: 20px 15px;
    }
}

/* ===========================
   Custom Markdown Controls
   =========================== */
.mdsm-custom-markdown-controls {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

#add-custom-markdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

#add-custom-markdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mdsm-custom-file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mdsm-delete-custom-file {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mdsm-delete-custom-file:hover {
    background: #c82333;
}

.mdsm-delete-custom-file .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mdsm-empty-message {
    color: #999;
    font-style: italic;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0;
}

/* ===========================
   Document Metadata Display
   =========================== */
.mdsm-file-metadata {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 12px;
}

.mdsm-metadata-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    line-height: 1.5;
}

.mdsm-metadata-row:last-child {
    margin-bottom: 0;
}

.mdsm-metadata-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
    flex-shrink: 0;
}

.mdsm-metadata-label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mdsm-metadata-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    color: #212529;
    word-break: break-all;
    flex: 1;
}

.mdsm-uuid {
    color: #667eea;
    font-weight: 500;
}

.mdsm-checksum {
    color: #28a745;
}

.mdsm-view-changelog {
    margin-top: 8px;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mdsm-view-changelog:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.mdsm-view-changelog .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Metadata responsive adjustments */
@media (max-width: 768px) {
    .mdsm-metadata-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mdsm-metadata-label {
        margin-bottom: 4px;
    }
    
    .mdsm-metadata-value {
        width: 100%;
    }
}

/* ===========================
   Changelog Modal
   =========================== */
.mdsm-changelog-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 4px;
}

.mdsm-changelog-info p {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.mdsm-changelog-content {
    max-height: 500px;
    overflow-y: auto;
}

.mdsm-changelog-entry {
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mdsm-changelog-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.mdsm-changelog-entry:last-child {
    margin-bottom: 0;
}

.mdsm-changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.mdsm-changelog-action {
    font-weight: 600;
    color: #212529;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mdsm-changelog-action-created {
    color: #28a745;
}

.mdsm-changelog-action-updated {
    color: #007bff;
}

.mdsm-changelog-timestamp {
    font-size: 12px;
    color: #6c757d;
    font-family: 'Courier New', Courier, monospace;
}

.mdsm-changelog-details {
    font-size: 12px;
    color: #495057;
}

.mdsm-changelog-details div {
    margin-bottom: 5px;
}

.mdsm-changelog-details div:last-child {
    margin-bottom: 0;
}

.mdsm-changelog-label {
    font-weight: 600;
    margin-right: 8px;
}

.mdsm-changelog-value {
    font-family: 'Courier New', Courier, monospace;
    color: #212529;
}

@media (max-width: 768px) {
    .mdsm-changelog-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
