/**
 * RR Subscriptions Frontend Styles
 */

/* Status Badges */
.rocket-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.rocket-status-trial {
    background: #d1ecf1;
    color: #0c5460;
}

.rocket-status-paused {
    background: #fff3cd;
    color: #856404;
}

.rocket-status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.rocket-status-pending-cancel {
    background: #f8d7da;
    color: #721c24;
}

.rocket-status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.rocket-status-expired {
    background: #e2e3e5;
    color: #6c757d;
}

.rocket-status-pending-payment {
    background: #cce5ff;
    color: #004085;
}

/* Subscriptions List */
.rocket-subscriptions-list {
    margin: 20px 0;
}

.rocket-subscriptions-table .rocket-item-name {
    margin-bottom: 3px;
}

.rocket-subscriptions-table .rocket-item-qty {
    color: #666;
}

.rocket-subscriptions-table .rocket-more-items {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.rocket-subscriptions-table .rocket-paused {
    color: #856404;
    font-style: italic;
}

/* Subscription View */
.rocket-subscription-view {
    margin: 20px 0;
}

.rocket-subscription-header {
    margin-bottom: 30px;
}

.rocket-subscription-header h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Actions */
.rocket-subscription-actions {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rocket-action-btn {
    cursor: pointer;
}

.rocket-btn-cancel {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.rocket-btn-cancel:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Cards */
.rocket-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.rocket-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

/* Items Table */
.rocket-items-table {
    width: 100%;
}

.rocket-items-table td,
.rocket-items-table th {
    padding: 12px;
    text-align: left;
}

/* Schedule Table */
.rocket-schedule-table {
    width: 100%;
}

.rocket-schedule-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rocket-schedule-table td:first-child {
    color: #666;
    font-weight: 500;
}

/* Activity List */
.rocket-activity-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rocket-activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rocket-activity-item:last-child {
    border-bottom: none;
}

.rocket-activity-action {
    font-weight: 600;
    color: #333;
}

.rocket-activity-note {
    color: #666;
}

.rocket-activity-date {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 3px;
}

/* Modal */
.rocket-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rocket-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.rocket-modal-content h3 {
    margin-top: 0;
}

.rocket-pause-options {
    margin: 20px 0;
}

.rocket-pause-options label {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.rocket-pause-options label:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.rocket-pause-options input[type="radio"] {
    margin-right: 10px;
}

.rocket-pause-options select,
.rocket-pause-options input[type="date"] {
    margin-left: 10px;
    padding: 5px 10px;
}

.rocket-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .rocket-subscription-header h2 {
        font-size: 18px;
    }
    
    .rocket-subscription-actions {
        flex-direction: column;
    }
    
    .rocket-subscription-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .rocket-subscriptions-table .rocket-subscription-items,
    .rocket-subscriptions-table .rocket-subscription-next-payment {
        display: none;
    }
}

/* Billing period indicator */
.rocket-billing-period {
    color: #666;
    font-weight: normal;
}

/* Loading state */
.rocket-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rocket-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: rocket-spin 0.8s linear infinite;
}

@keyframes rocket-spin {
    to {
        transform: rotate(360deg);
    }
}
