/**
 * DevLab Maintenance Mode - Admin Styles
 */

.mmbd-status-indicator {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.mmbd-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.mmbd-status-on {
    background-color: #fcf0f0;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.mmbd-status-on .mmbd-status-dot {
    background-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
    animation: mmbd-pulse 2s infinite;
}

.mmbd-status-off {
    background-color: #f0fcf4;
    border-left: 4px solid #28a745;
    color: #155724;
}

.mmbd-status-off .mmbd-status-dot {
    background-color: #28a745;
}

@keyframes mmbd-pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.form-table th { padding-top: 25px; }
.form-table td { padding-top: 20px; }
.form-table textarea.large-text { width: 100%; max-width: 600px; }
.form-table textarea.regular-text { width: 100%; max-width: 400px; }
.form-table input.small-text { width: 60px; }
.form-table td p.description { margin-top: 8px; color: #666; }
.form-table td p.description code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}
.form-table fieldset label { display: block; margin-bottom: 8px; }
.mmbd-bypass-role-label { display: block; margin-bottom: 5px; }

.mmbd-preview-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.mmbd-preview-section h2 { margin-top: 0; font-size: 16px; }
.mmbd-preview-section p { margin-bottom: 15px; }
.mmbd-preview-section p.description { margin-top: 10px; color: #666; font-size: 13px; }

.wrap h2 {
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mmbd-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
}

.mmbd-template-card {
    position: relative;
    display: block;
    cursor: pointer;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.mmbd-template-card:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mmbd-template-card.mmbd-template-selected {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.mmbd-template-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mmbd-template-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f5f5f5;
    overflow: hidden;
}

.mmbd-template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mmbd-template-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #2271b1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.mmbd-template-selected .mmbd-template-checkmark {
    opacity: 1;
    transform: scale(1);
}

.mmbd-template-checkmark svg {
    width: 14px;
    height: 14px;
    color: #fff;
}

.mmbd-template-info {
    padding: 12px;
    background: #fff;
}

.mmbd-template-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
    margin-bottom: 4px;
}

.mmbd-template-desc {
    display: block;
    font-size: 12px;
    color: #757575;
    line-height: 1.4;
}

@media screen and (max-width: 782px) {
    .mmbd-status-indicator { flex-direction: row; padding: 12px 15px; }
    .mmbd-status-text { font-size: 13px; }
    .form-table textarea.large-text,
    .form-table textarea.regular-text { width: 100%; max-width: 100%; }
    .mmbd-template-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
    .mmbd-template-info { padding: 10px; }
    .mmbd-template-name { font-size: 13px; }
    .mmbd-template-desc { font-size: 11px; }
}
