/**
 * Admin Subscription Views Styles
 *
 * Styles for admin-subscription-single.php and admin-subscriptions-list.php
 *
 * @package Swift Commerce
 */

/* ============================================
   Single Subscription View Styles
   ============================================ */

.synk-subscription-wrap {
    max-width: 1200px;
}

.synk-subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.synk-subscription-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.synk-subscription-title h1 {
    margin: 0;
    font-size: 24px;
}

.synk-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}

.synk-subscription-actions {
    display: flex;
    gap: 10px;
}

.synk-subscription-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.synk-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.synk-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

.synk-info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.synk-info-row:last-child {
    border-bottom: none;
}

.synk-info-label {
    font-weight: 500;
    width: 140px;
    flex-shrink: 0;
    color: #646970;
}

.synk-info-value {
    flex: 1;
}

.synk-full-width {
    grid-column: 1 / -1;
}

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

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

.synk-form-row input,
.synk-form-row select {
    width: 100%;
    max-width: 300px;
}

.synk-timeline {
    position: relative;
    padding-left: 25px;
}

.synk-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.synk-timeline-item {
    position: relative;
    padding-bottom: 15px;
}

.synk-timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7c3aed;
    border: 2px solid #fff;
}

.synk-timeline-date {
    font-size: 12px;
    color: #646970;
}

.synk-timeline-text {
    font-size: 14px;
    margin-top: 4px;
}

@media (max-width: 960px) {
    .synk-subscription-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Subscriptions List View Styles
   ============================================ */

.column-subscription {
    width: 120px;
}

.column-customer {
    width: 180px;
}

.column-product {
    width: auto;
}

.column-status {
    width: 120px;
}

.column-billing {
    width: 120px;
}

.column-next-payment {
    width: 120px;
}

.column-total {
    width: 100px;
}

.column-actions {
    width: 180px;
}

/* ---- Subscription action buttons ---- */
.sc-subscription-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.sc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
    color: #50575e;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.sc-action-btn:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

.sc-action-btn:focus {
    outline: 1px solid #2271b1;
    outline-offset: -1px;
    box-shadow: 0 0 0 1px #2271b1;
}

.sc-action-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
}

/* Activate */
.sc-action-activate {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.sc-action-activate:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Suspend */
.sc-action-suspend {
    background: #dba617;
    border-color: #dba617;
    color: #fff;
}

.sc-action-suspend:hover {
    background: #bd8600;
    border-color: #bd8600;
    color: #fff;
}

/* Cancel */
.sc-action-cancel {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.sc-action-cancel:hover {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}

/* View & Order - neutral */
.sc-action-view,
.sc-action-order {
    background: #f6f7f7;
    border-color: #c3c4c7;
    color: #2271b1;
}

.sc-action-view:hover,
.sc-action-order:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #135e96;
}
