/**
 * Admin styles for the Subscription System plugin
 */

.ss-admin-container {
    margin: 20px 0;
}

.ss-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ss-admin-title {
    margin: 0;
}

.ss-admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ss-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.ss-admin-table th,
.ss-admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ss-admin-table th {
    background-color: #f5f5f5;
}

.ss-admin-table tr:hover {
    background-color: #f9f9f9;
}

.ss-admin-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.ss-admin-form {
    max-width: 800px;
}

.ss-admin-form-row {
    margin-bottom: 15px;
}

.ss-admin-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ss-admin-form-row input[type="text"],
.ss-admin-form-row input[type="email"],
.ss-admin-form-row input[type="number"],
.ss-admin-form-row select,
.ss-admin-form-row textarea {
    width: 100%;
    padding: 8px;
}

.ss-admin-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ss-admin-plan {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
}

.ss-admin-plan-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ss-admin-plan-title {
    margin: 0 0 5px 0;
}

.ss-admin-actions {
    display: flex;
    gap: 5px;
}

.ss-admin-message {
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.ss-admin-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ss-admin-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard styles */
.card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-top: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.subscription-actions {
    margin-top: 15px;
}

.subscription-actions .button {
    margin-right: 10px;
}

.form-table th {
    width: 200px;
    font-weight: normal;
}

.form-table td strong {
    font-size: 16px;
}

/* Common styles for all subscription system admin pages */
.subscription-system-admin-page {
    background-color: #f0f0f1;
    padding: 15px;
    margin: -10px -20px;
}

.subscription-system-admin-page .wrap {
    margin: 0;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 2px;
}

.subscription-system-admin-page .wp-heading-inline {
    margin-top: 0;
    padding-top: 0;
}

.subscription-system-admin-page .card {
    margin-top: 20px;
    border: 1px solid #c3c4c7;
}

.subscription-system-admin-page .postbox {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-bottom: 20px;
}

.subscription-system-admin-page .postbox-header {
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
}

.subscription-system-admin-page .postbox .hndle {
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
    color: #1d2327;
}

.subscription-system-admin-page .postbox .inside {
    padding: 12px;
    margin: 0;
    background: #fff;
}

.subscription-system-admin-page .nav-tab-wrapper {
    margin-bottom: 15px;
    border-bottom: 1px solid #c3c4c7;
}

.subscription-system-admin-page .nav-tab {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    color: #646970;
}

.subscription-system-admin-page .nav-tab:hover {
    background: #f6f7f7;
    color: #135e96;
}

.subscription-system-admin-page .nav-tab-active, 
.subscription-system-admin-page .nav-tab-active:hover {
    background: #fff;
    color: #000;
    border-bottom: 1px solid #fff;
}

/* Form styling */
.subscription-system-admin-page .form-table th {
    padding: 20px 10px 20px 0;
    width: 200px;
}

.subscription-system-admin-page .form-table td {
    padding: 15px 10px;
}

.subscription-system-admin-page .form-table select {
    min-width: 300px;
}

.subscription-system-admin-page .submit-wrapper {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

/* Button styling */
.subscription-system-admin-page .wp-core-ui .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.subscription-system-admin-page .wp-core-ui .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Input styling - Fix for checkboxes */
.subscription-system-admin-page input[type=checkbox] {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #50575e;
    clear: none;
    cursor: pointer;
    display: inline-block;
    line-height: 0;
    height: 1rem;
    margin: -0.25rem 0.25rem 0 0;
    outline: 0;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
    width: 1rem;
    min-width: 1rem;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    transition: .05s border-color ease-in-out;
}

.subscription-system-admin-page input[type=checkbox]:checked {
    background: #2271b1;
    border-color: #2271b1;
}

.subscription-system-admin-page input[type=checkbox]:checked::before {
    content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z' fill='%23fff'/></svg>");
    margin: -0.1875rem 0 0 -0.25rem;
    height: 1.3125rem;
    width: 1.3125rem;
    display: inline-block;
}

.subscription-system-admin-page input[type=checkbox]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

/* Ensure labels are properly aligned with checkboxes */
.subscription-system-admin-page input[type=checkbox] + label {
    vertical-align: middle;
    margin-left: 5px;
}

/* Table styling */
.subscription-system-admin-page .wp-list-table {
    border: 1px solid #c3c4c7;
}

.subscription-system-admin-page .wp-list-table th {
    background: #f6f7f7;
}

/* Settings Tabs */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

.tab-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
}

/* Form styling */
.form-table th {
    width: 200px;
}

.regular-text {
    width: 350px;
}

/* Notice styling */
.notice {
    margin: 15px 0;
    padding: 10px;
    border-left: 4px solid #00a0d2;
    background: #f7fcff;
}

/* Stripe Status Indicators */
.stripe-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stripe-status.connected {
    background-color: #e6f7e6;
    color: #2a8d2a;
}

.stripe-status.not-connected {
    background-color: #fff4e5;
    color: #e67e22;
}

.stripe-status.mock-connected {
    background-color: #fff4e5;
    color: #e67e22;
}

.stripe-status .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.sync-with-stripe {
    font-size: 11px;
    text-decoration: none;
}

.api-key-mode {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
}

.test-mode {
    background-color: #ffeb3b;
    color: #333;
}

.live-mode {
    background-color: #4caf50;
    color: white;
}

/* Admin bar Stripe mode indicator */
#wpadminbar #wp-admin-bar-stripe-mode .ab-icon:before {
    content: '\f348';
    top: 2px;
}

#wpadminbar .stripe-mode-indicator {
    display: inline-block;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 9px;
    line-height: 17px;
    font-weight: bold;
}

#wpadminbar .test-mode {
    background-color: #ffeb3b;
    color: #333;
}

#wpadminbar .live-mode {
    background-color: #4caf50;
    color: white;
}

/* Subscribers page specific styles */
.post-type-subscription_page_subscription-subscribers .wrap {
    max-width: 1400px;
}

.post-type-subscription_page_subscription-subscribers .subscription-system-card {
    transition: all 0.3s ease;
}

.post-type-subscription_page_subscription-subscribers .subscription-system-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .subscribers-stats {
        flex-direction: column;
    }
    
    .stat-card {
        margin-bottom: 10px;
    }
    
    .subscribers-filters {
        flex-direction: column;
    }
    
    .subscribers-filters .filter-group {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .subscribers-filters select,
    .subscribers-filters input[type="text"] {
        width: 100%;
    }
}

/* Improve table responsiveness */
@media screen and (max-width: 1200px) {
    .subscribers-table {
        display: block;
        overflow-x: auto;
    }
} 