/* Rsilitech Simple Pricing Admin Styles */

.rs-simple-pricing-wrapper {
    background: #fff;
    padding: 23px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 1200px;
}

.rs-header {
    border-bottom: 3px solid #2271b1;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.rs-header h1 {
    color: #1d2327;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}

.rs-header h1 .dashicons {
    color: #2271b1;
}

.subtitle {
    color: #646970;
    margin: 5px 0 0;
    font-size: 14px;
}

.rs-notice {
    background: #f0f6fc;
    border-left: 4px solid #72aee6;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.rs-notice p {
    margin: 0;
}

.upgrade-link {
    color: #8a2387;
    font-weight: 600;
    text-decoration: none;
}

.upgrade-link:hover {
    text-decoration: underline;
}

/* Discount Table */
.rs-discount-table {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    background: #f6f7f7;
    border-bottom: 2px solid #dcdcde;
    padding: 15px;
    font-weight: 600;
    color: #1d2327;
    gap: 15px;
}

.table-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
}

.table-section h3 {
    margin: 0 0 15px 0;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.table-section h3 .dashicons {
    color: #50575e;
}

.table-body {
    margin-top: 15px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f6f7f7;
    transition: background 0.2s;
    gap: 15px;
}

.table-row:hover {
    background: #f9f9f9;
}

.custom-roles-section {
    background: #f9f9f9;
    border-left: 4px solid #8a2387;
}

.custom-role-row {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Cell Styles */
.cell-role,
.cell-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    width: fit-content;
}

.role-administrator { background: #dc3232; }
.role-editor { background: #f56e28; }
.role-author { background: #ffb900; }
.role-contributor { background: #46b450; }
.role-subscriber { background: #00a0d2; }
.role-customer { background: #00a32a; }
.role-shop_manager { background: #826eb4; }

.role-slug {
    font-size: 11px;
    color: #646970;
    font-family: monospace;
    margin-top: 2px;
}

.field-description {
    color: #8c8f94;
    font-size: 11px;
    margin-top: 2px;
}

.cell-discount {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discount-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.discount-input input {
    width: 70px;
    text-align: center;
}

.discount-input input:focus {
    border-color: #8a2387;
    box-shadow: 0 0 0 1px #8a2387;
}

.percent {
    color: #646970;
    font-weight: 500;
}

.discount-type {
    color: #8c8f94;
    font-size: 11px;
}

.cell-users {
    color: #50575e;
    font-size: 14px;
}

.user-count {
    font-weight: 600;
    color: #1d2327;
}

.cell-status .status-active {
    color: #00a32a;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.cell-status .status-inactive {
    color: #646970;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cell-actions {
    display: flex;
    gap: 8px;
}

.button-small {
    padding: 4px 12px;
    font-size: 12px;
}

.button-link-delete {
    color: #d63638;
    border-color: #d63638;
}

.button-link-delete:hover {
    background: #d63638;
    color: white;
    border-color: #d63638;
}

/* Statistics Cards */
.rs-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f0f6fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2271b1;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Settings Section */
.rs-settings {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.rs-settings h3 {
    margin: 0 0 20px 0;
    color: #1d2327;
    font-size: 16px;
}

.rs-settings .form-table {
    margin-top: 0;
}

.rs-settings th {
    padding: 20px 10px 20px 0;
    width: 200px;
}

.rs-settings td {
    padding: 20px 10px;
}

.rs-settings label {
    display: block;
    margin-bottom: 10px;
    font-weight: normal;
}

.rs-settings label:last-child {
    margin-bottom: 0;
}

.rs-settings input[type="checkbox"] {
    margin-right: 8px;
}

.rs-settings input[type="checkbox"]:checked {
    background-color: #8a2387;
    border-color: #8a2387;
}

/* Footer Actions */
.rs-footer-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
    flex-wrap: wrap;
}

.rs-footer-actions .button-primary {
    background: #8a2387;
    border-color: #8a2387;
}

.rs-footer-actions .button-primary:hover,
.rs-footer-actions .button-primary:focus {
    background: #6a1b6a;
    border-color: #6a1b6a;
}

.footer-links {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

.view-docs, .view-pro {
    color: #2271b1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.view-pro {
    color: #8a2387;
    font-weight: 600;
}

.view-docs:hover,
.view-pro:hover {
    text-decoration: underline;
}

/* Add Custom Role Button */
.add-custom-role {
    margin-top: 15px;
    text-align: center;
}

.add-custom-role .button {
    background: #8a2387;
    border-color: #8a2387;
    color: white;
    padding: 8px 20px;
}

.add-custom-role .button:hover {
    background: #6a1b6a;
    border-color: #6a1b6a;
}

.no-custom-roles {
    text-align: center;
    padding: 30px;
    color: #646970;
    background: #f6f7f7;
    border-radius: 4px;
    border: 2px dashed #dcdcde;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rs-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .rs-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-links {
        margin-left: 0;
        margin-top: 15px;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .rs-simple-pricing-wrapper {
        padding: 15px;
        margin: 10px 0;
    }
    
    .table-section {
        padding: 15px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* WordPress Compatibility */
.wp-core-ui .button.button-link-delete {
    color: #d63638;
    border-color: #d63638;
}

.wp-core-ui .button.button-link-delete:hover {
    background: #d63638;
    color: white;
}

/* Animation for new rows */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-role-row {
    animation: fadeIn 0.3s ease-out;
}

/* Bulk Actions */
.rs-bulk-actions {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #ffb900;
}

.rs-bulk-actions .button {
    background: #fff8e5;
    border-color: #ffb900;
    color: #8a6d3b;
}

.rs-bulk-actions .button:hover {
    background: #ffb900;
    border-color: #ffb900;
    color: #fff;
}

/* Custom Roles Notice */
.custom-roles-notice {
    background: #fff8e5;
    border-left: 4px solid #ffb900;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.custom-roles-notice p {
    margin: 0;
}

/* No Action Placeholder */
.no-action {
    color: #8c8f94;
    font-style: italic;
    font-size: 13px;
}

/* Disabled Pro Features */
.button:disabled,
input:readonly {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive for custom roles section */
.custom-roles-section .table-header,
.custom-roles-section .table-row {
    grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr;
}

@media (max-width: 1024px) {
    .custom-roles-section .table-header,
    .custom-roles-section .table-row {
        grid-template-columns: 1fr;
    }
}