/**
 * Admin Settings Page Styles
 */

.msps-settings-wrap {
    max-width: 1200px;
}

.msps-settings-content {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* Overview Tab */
.msps-overview-wrapper {
    padding: 20px 0;
}

.msps-overview-header {
    margin-bottom: 20px;
}

.msps-overview-header h3 {
    margin: 0 0 10px;
}

.msps-overview-filters {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.msps-overview-filters label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.msps-overview-filters select {
    min-width: 150px;
}

.msps-overview-table {
    margin: 20px 0;
}

.msps-overview-table th {
    font-weight: 600;
}

.msps-overview-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.msps-no-sales {
    padding: 40px;
    text-align: center;
    color: #666;
}

/* Import/Export Tab */
.msps-import-export-wrapper {
    padding: 20px 0;
}

.msps-section {
    margin-bottom: 30px;
}

.msps-section h3 {
    margin: 0 0 15px;
}

.msps-section hr {
    margin: 40px 0;
}

.msps-import-form {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.msps-import-form .spinner {
    float: none;
    margin-left: 10px;
    visibility: hidden;
}

.msps-import-form .spinner.is-active {
    visibility: visible;
}

#msps-import-result {
    margin-top: 15px;
}

.msps-import-instructions {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.msps-import-instructions h4 {
    margin: 0 0 10px;
}

.msps-import-instructions ul {
    margin: 10px 0 0 20px;
}

.msps-import-instructions li {
    margin-bottom: 5px;
}

/* Log Tab */
.msps-log-wrapper {
    padding: 20px 0;
}

.msps-log-header {
    margin-bottom: 20px;
}

.msps-log-header h3 {
    margin: 0 0 10px;
}

.msps-log-actions {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    gap: 10px;
}

.msps-log-viewer {
    margin: 20px 0;
}

.msps-log-viewer textarea {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    resize: vertical;
}

.msps-log-filters {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.msps-log-filters h4 {
    margin: 0 0 10px;
}

.msps-log-filters select {
    min-width: 200px;
}

/* Status Badges */
.msps-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.msps-status-scheduled {
    background: #e0f2ff;
    color: #0066cc;
}

.msps-status-active {
    background: #d4edda;
    color: #155724;
}

.msps-status-expired {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .msps-settings-content {
        padding: 15px;
    }
    
    .msps-overview-table {
        font-size: 12px;
    }
    
    .msps-log-actions {
        flex-direction: column;
    }
    
    .msps-log-viewer textarea {
        font-size: 11px;
    }
}

/* Dashboard Widget */
.msps-dashboard-widget {
    padding: 0;
}

.msps-widget-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.msps-stat-box {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.msps-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: #2271b1;
    line-height: 1;
    margin-bottom: 5px;
}

.msps-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.msps-widget-upcoming,
.msps-widget-ending {
    margin-bottom: 20px;
}

.msps-widget-upcoming h4,
.msps-widget-ending h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.msps-widget-upcoming ul,
.msps-widget-ending ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.msps-widget-upcoming li,
.msps-widget-ending li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msps-widget-upcoming li:last-child,
.msps-widget-ending li:last-child {
    border-bottom: none;
}

.msps-widget-upcoming strong,
.msps-widget-ending strong {
    flex: 1;
    font-size: 13px;
}

.msps-widget-price {
    font-weight: 600;
    color: #2271b1;
}

.msps-widget-date {
    font-size: 11px;
    color: #666;
}

.msps-widget-footer {
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

@media screen and (max-width: 782px) {
    .msps-widget-stats {
        flex-direction: column;
    }
}

/* ==========================================================================
   Promotional notice - Plugin install boxes
   ========================================================================== */

:root {
    --msps-brand: #2271b1;
}

.msps-promo-notice {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 10px;
}

.msps-promo-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.msps-promo-column {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.msps-promo-column > .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--msps-brand, #0073aa);
    margin-bottom: 12px;
}

.msps-promo-column h5 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
}

.msps-promo-column p {
    margin: 0 0 15px;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
    flex-grow: 1;
}

.msps-promo-notice .msps-promo-column .button {
    align-self: flex-start;
    margin-top: auto;
    white-space: normal;
    height: auto;
    min-height: auto;
    line-height: 1.4;
    padding: 6px 12px;
    text-align: center;
}

/* Responsive: 2 columns on medium screens */
@media screen and (max-width: 1200px) {
    .msps-promo-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on mobile */
@media screen and (max-width: 782px) {
    .msps-promo-columns {
        grid-template-columns: 1fr;
    }
}
/* Command Palette tip */
.msps-command-palette-tip {
    margin-top: 15px;
    padding: 10px 14px;
    background: #f0f6fc;
    border-left: 4px solid #72aee6;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}

.msps-command-palette-tip .dashicons {
    color: #72aee6;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.msps-command-palette-tip kbd {
    display: inline-block;
    padding: 2px 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    font-size: 12px;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    box-shadow: 0 1px 0 #c3c4c7;
}

/* Discounts that cannot resolve to a price */
.msps-price-unresolved {
    color: #b32d2e;
    font-weight: 600;
    cursor: help;
}
