/*
Theme Name: SportsMI Child
Description: Child theme for SportsMI
Author: Your Name
Template: sportsmi
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../sportsmi/style.css");

/* Subscriptions Page Styling */
.woocommerce-subscriptions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.woocommerce-subscriptions-table th,
.woocommerce-subscriptions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.page-id-12 .tp-page-content table a {
    color: var(--woo-primary-color) !important;
}

.woocommerce-subscriptions-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.woocommerce-subscriptions-table tr:hover {
    background-color: #f8f9fa;
}

.woocommerce-subscription-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-subscription-status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce-subscription-status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.woocommerce-subscription-status-canceled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.woocommerce-subscription-status-suspended {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.subscription-cancelled {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.cancel-subscription-button {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

.cancel-subscription-button:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
}

.cancel-subscription-button:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design for subscriptions table */
@media (max-width: 768px) {
    .woocommerce-subscriptions-table {
        font-size: 14px;
    }
    
    .woocommerce-subscriptions-table th,
    .woocommerce-subscriptions-table td {
        padding: 8px 6px;
    }
    
    .woocommerce-subscriptions-table__header-actions,
    .woocommerce-subscriptions-table__cell-actions {
        min-width: 120px;
    }
}

/* Message styling */
.subscription-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid;
}

.subscription-message.woocommerce-message {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.subscription-message.woocommerce-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Subscription table responsive improvements */
@media (max-width: 600px) {
    .woocommerce-subscriptions-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .woocommerce-subscriptions-table th,
    .woocommerce-subscriptions-table td {
        min-width: 100px;
    }
    
    .woocommerce-subscriptions-table__cell-subscription {
        min-width: 120px;
    }
    
    .woocommerce-subscriptions-table__cell-product {
        min-width: 150px;
    }
}

/* Billing History Styles */
.woocommerce-billing-history {
    margin-bottom: 2em;
}

.billing-history-item {
    transition: all 0.3s ease;
}

.billing-history-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.billing-header h3 {
    font-size: 1.2em;
    font-weight: 600;
}

.subscription-status .woocommerce-subscription-status {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-subscription-status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce-subscription-status-cancelled,
.woocommerce-subscription-status-canceled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.woocommerce-subscription-status-expired {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.woocommerce-subscription-status-suspended {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.billing-details {
    margin: 20px 0;
}

.info-grid {
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #495057;
    font-weight: 600;
}

.next-billing-date {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.next-billing-date div:first-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #155724;
    margin-bottom: 5px;
}

.no-next-billing {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.billing-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.billing-table table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.billing-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.billing-table tr:hover {
    background-color: #f8f9fa;
}

.billing-table tr:last-child td {
    border-bottom: none;
}

.billing-table code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    color: #495057;
    border: 1px solid #e9ecef;
}

.woocommerce-billing-history-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.woocommerce-billing-history-empty div:first-child {
    font-size: 3em;
    color: #dee2e6;
    margin-bottom: 20px;
}

.woocommerce-billing-history-empty h3 {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 1.5em;
}

.woocommerce-billing-history-empty p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .billing-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .billing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .billing-table {
        overflow-x: auto;
    }
    
    .billing-table table {
        min-width: 800px;
    }
    
    .billing-table th,
    .billing-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .billing-table th {
        font-size: 11px;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .billing-history-item {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .billing-header h3 {
        font-size: 1.1em;
    }
    
    .next-billing-date div:first-child {
        font-size: 1.2em;
    }
    
    .billing-table table {
        min-width: 600px;
    }
    
    .billing-table th,
    .billing-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
}

/* Print styles for billing history */
@media print {
    .billing-history-item {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 20px;
    }
    
    .billing-table {
        border: 1px solid #000;
    }
    
    .billing-table th,
    .billing-table td {
        border: 1px solid #000;
        padding: 8px;
    }
}