/**
 * AIAC Resonance Signature Styles v1.1.0
 */

/* -------------------------------------------------------------------------
   Save to Database button
------------------------------------------------------------------------- */
.aiac-rs-wrapper .pg-btn-save-db {
    background: #3a3a3a;
    color: #ffffff;
    border: 2px solid #3a3a3a;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.aiac-rs-wrapper .pg-btn-save-db:hover {
    background: #2a2a2a;
    border-color: #222;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------------------------------------
   Save notice
------------------------------------------------------------------------- */
.aiac-rs-notice {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid #666;
}

.aiac-rs-notice.success {
    background: #d4edda;
    border-left-color: #3a3a3a;
    color: #155724;
}

.aiac-rs-notice.error {
    background: #f8d7da;
    border-left-color: #3a3a3a;
    color: #721c24;
}

/* -------------------------------------------------------------------------
   Save dialog
------------------------------------------------------------------------- */
#aiac-rs-save-dialog {
    margin-top: 16px;
    padding: 16px 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#aiac-rs-save-dialog label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #3a3a3a;
    margin-bottom: 10px;
}

.aiac-rs-save-dialog-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.aiac-rs-save-dialog-row .pg-input {
    flex: 1;
    min-width: 180px;
}

/* -------------------------------------------------------------------------
   Version history panel
------------------------------------------------------------------------- */
#aiac-rs-history-panel {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 20px 24px;
    margin-top: 24px;
}

.aiac-rs-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.aiac-rs-history-header strong {
    font-size: 14px;
    color: #23282d;
    font-weight: 600;
}

#aiac-rs-history-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0 4px;
}

#aiac-rs-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aiac-rs-history-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}

.aiac-rs-history-item:last-child {
    border-bottom: none;
}

.aiac-rs-no-history {
    font-size: 13px;
    color: #999;
    padding: 8px 0;
}

.aiac-rs-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.aiac-rs-history-label {
    font-size: 13px;
    color: #444;
    flex: 1;
}

.aiac-rs-history-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   History action buttons
------------------------------------------------------------------------- */
.aiac-rs-action-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #3a3a3a;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.aiac-rs-action-btn:hover {
    background: #3a3a3a;
    border-color: #3a3a3a;
    color: #fff;
}

.aiac-rs-delete-btn {
    color: #c53030;
}

.aiac-rs-delete-btn:hover {
    background: #c53030;
    border-color: #c53030;
    color: #fff;
}

/* -------------------------------------------------------------------------
   Preview area
------------------------------------------------------------------------- */
.aiac-rs-preview {
    margin-top: 10px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 13px;
}

.aiac-rs-preview-list {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 12px;
}

.aiac-rs-preview-list dt {
    font-weight: 600;
    color: #555;
    text-transform: capitalize;
}

.aiac-rs-preview-list dd {
    margin: 0;
    color: #333;
    white-space: pre-wrap;
}

/* -------------------------------------------------------------------------
   Rename row
------------------------------------------------------------------------- */
.aiac-rs-rename-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.aiac-rs-rename-input {
    flex: 1;
    min-width: 160px;
    font-size: 13px;
    padding: 6px 10px;
}

/* -------------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------- */
@media screen and (max-width: 600px) {
    .aiac-rs-history-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .aiac-rs-history-actions {
        flex-wrap: wrap;
    }
    .aiac-rs-save-dialog-row {
        flex-direction: column;
    }
    .aiac-rs-save-dialog-row .pg-input {
        width: 100%;
    }
}
