/**
 * DILA Admin Styles
 */

/* General Admin Styles */
.dila-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.dila-card h2 {
    margin-top: 0;
    font-size: 14px;
    font-weight: 600;
}

/* Meta Box Styles */
#dila-meta-box-content {
    margin: -6px -12px -12px;
    padding: 12px;
}

.dila-suggestion-card {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.2s ease;
}

.dila-suggestion-card:hover {
    border-color: #2271b1;
    background: #fff;
}

.dila-suggestion-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.dila-anchor-text {
    display: inline-block;
    padding: 4px 8px;
    background: #2271b1;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin: 4px 4px 4px 0;
    border: none;
    transition: background 0.2s ease;
}

.dila-anchor-text:hover {
    background: #135e96;
}

.dila-anchor-text:active {
    background: #0a4a7a;
}

.dila-relevance {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.dila-loading {
    text-align: center;
    padding: 20px;
}

.dila-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: dila-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes dila-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dila-no-suggestions,
.dila-error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.dila-error {
    color: #d63638;
}

/* Settings Page Styles */
.dila-settings-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.dila-settings-main {
    flex: 1;
}

.dila-settings-sidebar {
    width: 300px;
}

.dila-status {
    margin: 15px 0;
}

.dila-status p {
    margin: 5px 0;
}

.dila-status-progress {
    color: #2271b1;
}

.dila-status-progress .dashicons {
    animation: rotation 2s infinite linear;
}

@keyframes rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(359deg); }
}

/* Orphan Page Styles */
.dila-suggest-links {
    white-space: nowrap;
}

/* Modal Styles */
.dila-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
}

.dila-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 100001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dila-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.dila-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.dila-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.dila-modal-close:hover {
    color: #d63638;
}

.dila-suggestion-item {
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

.dila-suggestion-item h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.dila-suggestion-item p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.dila-suggestion-item .button {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 782px) {
    .dila-settings-container {
        flex-direction: column;
    }

    .dila-settings-sidebar {
        width: 100%;
    }

    .dila-modal-content {
        width: 95%;
        padding: 15px;
    }
}

/* Notices */
.dila-notice {
    margin: 10px 0;
    padding: 10px;
    border-left: 4px solid #2271b1;
    background: #f0f6fc;
}

.dila-notice.error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

.dila-notice.success {
    border-left-color: #00a32a;
    background: #f0f6fc;
}
