/**
 * Lyxity admin styles
 */

/* Fix WordPress admin styles conflicts with Bootstrap */
.wrap .form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    margin-bottom: 20px;
}

.wrap .form-group {
    margin-right: 15px;
}

.wrap .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wrap .btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wrap .btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.wrap .btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.wrap .table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.wrap .table th,
.wrap .table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.wrap .table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.wrap .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Plugin specific styles */
#blogsTableContainer {
    margin-top: 20px;
}

.pagination-controls {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-controls button {
    margin: 0 10px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#originalContent,
#contentUpdate,
#blogSummary,
#deadLinks {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    padding: 10px;
    background-color: #f9f9f9;
    max-height: 300px;
    overflow-y: auto;
}

.lyxity-logs-container {
    background: #f5f5f5;
    padding: 10px;
    border: 1px solid #ccc;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 13px;
}

/* Modal styling */
#update-preview-modal {
    z-index: 99999 !important;
}
.ui-widget-overlay {
    z-index: 99998 !important;
}

/* Ensure Alertify appears above modal */
.alertify {
    z-index: 100000;
}

/* Modal styling */
.modal {
    z-index: 9999;
}

.content-preview {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Ensure modals are properly contained */
.modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: .3rem;
    outline: 0;
}

/* Debug outline to ensure buttons are properly sized and visible */
.update-single-post, .rewrite-single-post {
    position: relative;
    z-index: 5;
    margin: 0 5px;
    min-width: 80px;
}
