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

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

.ss-plan {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.ss-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.ss-plan-title {
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.ss-plan-price {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.ss-plan-duration {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.ss-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.ss-plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ss-plan-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.ss-plan-button:hover {
    background-color: #005177;
    color: white;
}

.ss-form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ss-form-title {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

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

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

.ss-form-submit {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ss-form-submit:hover {
    background-color: #005177;
}

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

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

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

.ss-subscriptions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

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

.ss-cancel-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.ss-cancel-button:hover {
    background-color: #c82333;
    color: white;
}

/* General styles for all layouts */
.subscription-pricing-plans {
    margin: 30px 0;
}

.subscription-pricing-plans .ss-pricing-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .subscription-pricing-plans .ss-pricing-container {
        flex-direction: column;
        align-items: center;
    }
    
    .subscription-pricing-plans .ss-pricing-plan {
        width: 100%;
        max-width: 100%;
    }
}

.subscribe-button.loading {
    position: relative;
    color: transparent !important;
}

.subscribe-button.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Subscription details styling */
.subscription-details-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
}

.subscription-details-card h3 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 18px;
    color: #23282d;
}

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

.subscription-info p {
    margin-bottom: 12px;
    font-size: 15px;
}

.subscription-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subscription-status.active {
    background-color: #e3f9e5;
    color: #0a7d33;
    border: 1px solid #a3e9b7;
}

.subscription-status.paused {
    background-color: #fff8e6;
    color: #b78105;
    border: 1px solid #ffeeba;
}

.subscription-status.cancelled {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
}

.subscription-status.expired {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
}

.subscription-status.canceled {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
}

.renewal-type {
    display: inline-block;
    font-size: 12px;
    color: #646970;
    font-style: italic;
    margin-left: 5px;
}

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

.subscription-history {
    margin-top: 30px;
}

.subscription-history h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #23282d;
}

.subscription-history-table {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.subscription-history-table th {
    background-color: #f6f7f7;
    font-weight: 600;
    color: #23282d;
    padding: 12px 15px;
}

.subscription-history-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.subscription-history-table tr:hover td {
    background-color: #f9f9f9;
}

.no-subscription {
    text-align: center;
    padding: 40px 0;
}

.subscription-system-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscription-system-btn-primary {
    background-color: #2271b1;
    color: #fff;
    border: 1px solid #2271b1;
}

.subscription-system-btn-primary:hover {
    background-color: #135e96;
    border-color: #135e96;
}

.subscription-system-btn-danger {
    background-color: #fff;
    color: #d63638;
    border: 1px solid #d63638;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 24px;
}

.subscription-system-btn-danger:hover {
    background-color: #d63638;
    color: #fff;
}

/* Add these styles for the enhanced subscription history component */

/* Account overview section */
.account-overview-section {
    margin-bottom: 40px;
}

.account-info-card,
.subscription-summary-card,
.subscription-period-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.account-info-card h3,
.subscription-summary-card h3,
.subscription-period-card h3 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 18px;
    color: #23282d;
}

.account-info p,
.subscription-summary p {
    margin: 10px 0;
}

.view-subscription-link {
    display: inline-block;
    margin-top: 10px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.view-subscription-link:hover {
    text-decoration: underline;
}

/* Recent activity section */
.recent-activity {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    border: 1px solid #e5e5e5;
}

.recent-activity h3 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 18px;
    color: #23282d;
}

.view-all-link {
    text-align: center;
    margin-top: 20px;
}

/* Subscription history component */
.subscription-history-component {
    margin-top: 20px;
}

.subscription-history-component h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #23282d;
}

.subscription-history-wrapper {
    overflow-x: auto;
}

.subscription-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.subscription-history-table th {
    background-color: #f6f7f7;
    font-weight: 600;
    color: #23282d;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.subscription-history-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.subscription-history-table tr:last-child td {
    border-bottom: none;
}

.subscription-history-table tr:hover td {
    background-color: #f9f9f9;
}

.subscription-actions-cell {
    white-space: nowrap;
}

.subscription-action-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 5px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pause-subscription {
    background-color: #fff8e6;
    color: #b78105;
    border: 1px solid #ffeeba;
}

.pause-subscription:hover {
    background-color: #fff5d8;
}

.resume-subscription {
    background-color: #e3f9e5;
    color: #0a7d33;
    border: 1px solid #a3e9b7;
}

.resume-subscription:hover {
    background-color: #d1f7d7;
}

.cancel-subscription {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
}

.cancel-subscription:hover {
    background-color: #fde8ea;
}

.renew-subscription {
    background-color: #e6f0fa;
    color: #2271b1;
    border: 1px solid #c5d9ed;
}

.renew-subscription:hover {
    background-color: #d9e7f6;
}

.view-invoice {
    background-color: #f0f0f1;
    color: #50575e;
    border: 1px solid #dcdcde;
}

.view-invoice:hover {
    background-color: #e5e5e5;
}

.subscription-history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 0 10px;
}

.showing-entries {
    color: #646970;
    font-size: 13px;
    margin: 0;
}

.no-history-message {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: #646970;
}

/* Secondary button style */
.subscription-system-btn-secondary {
    background-color: #f0f0f1;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.subscription-system-btn-secondary:hover {
    background-color: #f6f7f7;
    color: #135e96;
    border-color: #135e96;
}

/* Subscription History Tab Styles */
.history-tab {
    max-width: 1100px;
    margin: 0 auto;
}

.history-tab h2 {
    font-size: 24px;
    color: #23282d;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.history-tab h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #2271b1;
}

/* Enhanced filters section */
.subscription-history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    align-items: center;
}

.subscription-history-filters .filter-group {
    display: flex;
    align-items: center;
}

.subscription-history-filters label {
    margin-right: 10px;
    font-weight: 600;
    min-width: 80px;
    color: #23282d;
}

.subscription-history-filters select {
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease;
}

.subscription-history-filters select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.subscription-history-filters .date-range {
    display: flex;
    align-items: center;
}

.subscription-history-filters .date-inputs {
    display: flex;
    align-items: center;
}

.subscription-history-filters input[type="date"] {
    padding: 9px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    min-width: 150px;
    transition: all 0.2s ease;
}

.subscription-history-filters input[type="date"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.subscription-history-filters .date-separator {
    margin: 0 8px;
    color: #646970;
    font-weight: 500;
}

.subscription-history-filters #reset-filters {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f6f7f7;
    border: 1px solid #2271b1;
    color: #2271b1;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.subscription-history-filters #reset-filters:hover {
    background-color: #f0f0f1;
    color: #135e96;
    border-color: #135e96;
}

.subscription-history-filters #reset-filters .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Enhanced history component styling */
.subscription-history-component {
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    padding: 25px;
}

.subscription-history-component h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #23282d;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.subscription-history-wrapper {
    overflow-x: auto;
}

.subscription-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.subscription-history-table th {
    background-color: #f6f7f7;
    font-weight: 600;
    color: #23282d;
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.subscription-history-table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.subscription-history-table tr:last-child td {
    border-bottom: none;
}

.subscription-history-table tr:hover td {
    background-color: #f9f9f9;
}

/* Enhanced status badges */
.subscription-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    min-width: 80px;
}

.subscription-status.active {
    background-color: #e3f9e5;
    color: #0a7d33;
    border: 1px solid #a3e9b7;
    box-shadow: 0 1px 3px rgba(10, 125, 51, 0.1);
}

.subscription-status.paused {
    background-color: #fff8e6;
    color: #b78105;
    border: 1px solid #ffeeba;
    box-shadow: 0 1px 3px rgba(183, 129, 5, 0.1);
}

.subscription-status.cancelled, 
.subscription-status.canceled {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
    box-shadow: 0 1px 3px rgba(214, 54, 56, 0.1);
}

.subscription-status.expired {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
    box-shadow: 0 1px 3px rgba(214, 54, 56, 0.1);
}

/* Enhanced action buttons */
.subscription-actions-cell {
    white-space: nowrap;
}

.subscription-action-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 5px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pause-subscription {
    background-color: #fff8e6;
    color: #b78105;
    border: 1px solid #ffeeba;
}

.pause-subscription:hover {
    background-color: #fff5d8;
    box-shadow: 0 2px 5px rgba(183, 129, 5, 0.15);
}

.resume-subscription {
    background-color: #e3f9e5;
    color: #0a7d33;
    border: 1px solid #a3e9b7;
}

.resume-subscription:hover {
    background-color: #d1f7d7;
    box-shadow: 0 2px 5px rgba(10, 125, 51, 0.15);
}

.cancel-subscription {
    background-color: #feeef0;
    color: #d63638;
    border: 1px solid #f5c2c7;
}

.cancel-subscription:hover {
    background-color: #fde8ea;
    box-shadow: 0 2px 5px rgba(214, 54, 56, 0.15);
}

.renew-subscription {
    background-color: #e6f0fa;
    color: #2271b1;
    border: 1px solid #c5d9ed;
}

.renew-subscription:hover {
    background-color: #d9e7f6;
    box-shadow: 0 2px 5px rgba(34, 113, 177, 0.15);
}

.view-invoice {
    background-color: #f0f0f1;
    color: #50575e;
    border: 1px solid #dcdcde;
}

.view-invoice:hover {
    background-color: #e5e5e5;
    box-shadow: 0 2px 5px rgba(80, 87, 94, 0.15);
}

/* Enhanced footer */
.subscription-history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.showing-entries {
    color: #646970;
    font-size: 13px;
    margin: 0;
    font-style: italic;
}

.no-results-message {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-top: 15px;
    color: #646970;
    border: 1px dashed #dcdcde;
}

/* Pagination styling */
.subscription-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.subscription-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #dcdcde;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.subscription-pagination .page-numbers.current {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.subscription-pagination .page-numbers:hover:not(.current) {
    background-color: #f6f7f7;
    border-color: #c3c4c7;
}

/* Animation for loading state */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-state {
    animation: pulse 1.5s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .subscription-history-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subscription-history-filters .filter-group {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .subscription-history-filters label {
        min-width: 100px;
    }
    
    .subscription-history-filters select,
    .subscription-history-filters input[type="date"] {
        flex-grow: 1;
    }
    
    .subscription-history-filters .date-range {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .subscription-history-filters .date-inputs {
        width: 100%;
        margin-top: 10px;
        flex-direction: column;
    }
    
    .subscription-history-filters .date-inputs input[type="date"] {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .subscription-history-filters .date-separator {
        display: none;
    }
    
    .subscription-history-filters #reset-filters {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .subscription-history-table th,
    .subscription-history-table td {
        padding: 10px;
    }
    
    .subscription-action-btn {
        padding: 5px 8px;
        font-size: 11px;
        margin-bottom: 5px;
    }
} 