/**
 * NovaTI Subscriptions Public Styles
 *
 * @package NovaTI_Subscriptions
 * @since 2.0.0
 */

/* Status Badges */
.novati-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

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

.novati-status-trial {
    background: #e2d5f8;
    color: #5b3e99;
}

.novati-status-pending {
    background: #fff3cd;
    color: #856404;
}

.novati-status-on-hold {
    background: #ffeaa7;
    color: #9a6700;
}

.novati-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.novati-status-expired {
    background: #e9ecef;
    color: #495057;
}

.novati-status-pending-cancel {
    background: #ffe5d0;
    color: #c35800;
}

.novati-status-grace-period {
    background: #ffecd9;
    color: #b35900;
}

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

.novati-subscriptions-list .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.novati-subscriptions-list th,
.novati-subscriptions-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.novati-subscriptions-list th {
    font-weight: 600;
    background: #f8f9fa;
}

.novati-subscriptions-list .subscription-actions {
    white-space: nowrap;
}

.novati-subscriptions-list .subscription-actions .button {
    margin: 2px;
    padding: 6px 12px;
    font-size: 13px;
}

.novati-subscriptions-list .button.cancel {
    color: #dc3545;
    border-color: #dc3545;
}

.novati-subscriptions-list .button.cancel:hover {
    background: #dc3545;
    color: #fff;
}

/* Subscription View */
.novati-subscription-view {
    padding: 20px 0;
}

.novati-subscription-view h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.novati-subscription-view h3 {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f1;
}

.novati-subscription-view .subscription-back {
    margin-bottom: 20px;
}

.novati-subscription-view .subscription-back a {
    color: #666;
    text-decoration: none;
}

.novati-subscription-view .subscription-back a:hover {
    color: #333;
}

/* Subscription Details Table */
.novati-subscription-details .subscription-details {
    width: 100%;
    margin-bottom: 20px;
}

.novati-subscription-details th {
    width: 200px;
    text-align: left;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.novati-subscription-details td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.novati-subscription-details small {
    color: #666;
}

/* Subscription Actions */
.novati-subscription-actions .subscription-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.novati-subscription-actions .button {
    padding: 10px 20px;
}

/* Related Orders */
.novati-subscription-orders {
    margin-top: 30px;
}

/* Change Plan */
.novati-change-plan {
    padding: 20px 0;
}

.novati-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.novati-plan-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.novati-plan-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.novati-plan-card.current {
    border-color: #2271b1;
    background: #f0f6fc;
}

.novati-plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #2271b1;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.novati-plan-card h3 {
    margin: 0 0 15px;
    font-size: 18px;
    border-bottom: none;
}

.novati-plan-price {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 15px;
}

.novati-plan-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.novati-plan-card .button {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
}

/* Change Payment Method */
.novati-change-payment {
    padding: 20px 0;
}

.novati-payment-methods {
    margin: 20px 0;
}

.novati-payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.novati-payment-method:hover {
    border-color: #2271b1;
}

.novati-payment-method input[type="radio"] {
    margin-right: 15px;
}

.novati-card-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.novati-card-brand {
    font-weight: 600;
    text-transform: capitalize;
}

.novati-card-last4 {
    font-family: monospace;
    color: #666;
}

.novati-card-expiry {
    color: #999;
    font-size: 13px;
}

.novati-current-badge {
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

#novati-card-element {
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
}

#novati-card-errors {
    margin-top: 10px;
}

/* Checkout Subscription Summary */
.novati-checkout-subscription-summary {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.novati-checkout-subscription-summary h4 {
    margin: 0 0 15px;
    font-size: 16px;
}

.novati-checkout-subscription-summary table {
    width: 100%;
}

.novati-checkout-subscription-summary th,
.novati-checkout-subscription-summary td {
    padding: 8px 0;
    text-align: left;
}

.novati-checkout-subscription-summary th {
    font-weight: normal;
    color: #666;
}

.novati-checkout-subscription-summary td {
    font-weight: 600;
    text-align: right;
}

/* Product Page Subscription Info */
.novati-subscription-info {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.novati-subscription-info .price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.novati-subscription-info .billing-period {
    color: #666;
    font-size: 14px;
}

.novati-subscription-info .trial-info,
.novati-subscription-info .signup-fee-info {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}

.novati-subscription-info .trial-info {
    color: #155724;
}

/* Cart Subscription Items */
.novati-cart-subscription-details {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.novati-cart-subscription-details .billing-info,
.novati-cart-subscription-details .trial-info {
    display: block;
}

/* Thank You Page */
.novati-thank-you-subscription {
    margin: 20px 0;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
}

.novati-thank-you-subscription h3 {
    margin: 0 0 10px;
    color: #155724;
}

.novati-thank-you-subscription p {
    margin: 0;
    color: #155724;
}

/* Responsive Tables */
@media screen and (max-width: 768px) {
    .novati-subscriptions-list .shop_table_responsive thead {
        display: none;
    }
    
    .novati-subscriptions-list .shop_table_responsive tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        padding: 15px;
    }
    
    .novati-subscriptions-list .shop_table_responsive td {
        display: block;
        padding: 8px 0;
        border-bottom: none;
        text-align: left !important;
    }
    
    .novati-subscriptions-list .shop_table_responsive td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
    }
    
    .novati-subscriptions-list .subscription-actions {
        margin-top: 10px;
    }
    
    .novati-subscription-details th,
    .novati-subscription-details td {
        display: block;
        width: 100%;
    }
    
    .novati-subscription-details th {
        padding-bottom: 5px;
    }
    
    .novati-subscription-details td {
        padding-top: 5px;
        padding-bottom: 15px;
    }
    
    .novati-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .novati-subscription-view h2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Form Elements */
.novati-form-row {
    margin-bottom: 20px;
}

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

.novati-form-row input[type="text"],
.novati-form-row input[type="email"],
.novati-form-row select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
}

.novati-form-row input:focus,
.novati-form-row select:focus {
    border-color: #2271b1;
    outline: none;
}

/* Notices */
.novati-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.novati-notice-info {
    background: #e7f3ff;
    border: 1px solid #b6daff;
    color: #004085;
}

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

.novati-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

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

/* Loading State */
.novati-loading {
    position: relative;
    pointer-events: none;
}

.novati-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes novati-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.novati-animate {
    animation: novati-fade-in 0.3s ease-out;
}
/**
 * NovaTI Membership Frontend Styles
 */

/* Pricing Table */
.novati-pricing-table {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.novati-pricing-table.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.novati-pricing-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.novati-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.novati-pricing-card.highlighted {
    border-color: #c9a227;
    transform: scale(1.05);
    z-index: 1;
}

.novati-pricing-card.highlighted:hover {
    transform: scale(1.05) translateY(-5px);
}

.novati-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #c9a227;
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Level-specific colors */
.novati-pricing-card.level-pelerin .novati-pricing-title { color: #6c757d; }
.novati-pricing-card.level-disciple .novati-pricing-title { color: #1a365d; }
.novati-pricing-card.level-apotre .novati-pricing-title { color: #7b2d26; }

.novati-pricing-header {
    margin-bottom: 25px;
}

.novati-pricing-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.novati-pricing-price {
    font-size: 16px;
    color: #333;
}

.novati-pricing-price .price-amount {
    font-size: 48px;
    font-weight: 700;
}

.novati-pricing-price .price-currency {
    font-size: 24px;
    vertical-align: super;
}

.novati-pricing-price .price-period {
    color: #666;
}

.novati-pricing-features {
    margin: 25px 0;
    text-align: left;
}

.novati-pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.novati-pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.novati-pricing-features li:last-child {
    border-bottom: none;
}

.novati-pricing-features .feature-icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.novati-pricing-features .feature-included .feature-icon { color: #28a745; }
.novati-pricing-features .feature-excluded .feature-icon { color: #dc3545; }
.novati-pricing-features .feature-excluded { color: #999; }

.novati-pricing-footer {
    margin-top: 25px;
}

/* Buttons */
.novati-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.novati-btn-subscribe {
    background: #c9a227;
    color: #fff;
}

.novati-btn-subscribe:hover {
    background: #b08d1f;
    color: #fff;
}

.novati-btn-upgrade {
    background: #7b2d26;
    color: #fff;
}

.novati-btn-upgrade:hover {
    background: #5a1f1a;
    color: #fff;
}

.novati-btn-login {
    background: #1a365d;
    color: #fff;
}

.novati-btn-login:hover {
    background: #0f2744;
    color: #fff;
}

.novati-btn-current {
    background: #e5e5e5;
    color: #666;
    cursor: default;
}

/* Restricted Notice */
.novati-restricted-notice {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.novati-restricted-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.novati-restricted-notice h3 {
    color: #1a365d;
    margin: 0 0 15px;
}

.novati-restricted-notice p {
    color: #666;
    margin-bottom: 20px;
}

.novati-level-features {
    text-align: left;
    max-width: 300px;
    margin: 20px auto 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.novati-level-features h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}

.novati-level-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.novati-level-features li {
    padding: 5px 0;
    color: #28a745;
}

/* Membership Info */
.novati-membership-info {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.level-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.level-badge.level-pelerin { background: #e9ecef; color: #6c757d; }
.level-badge.level-disciple { background: #fff3cd; color: #856404; }
.level-badge.level-apotre { background: #f8d7da; color: #721c24; }

/* Usage Stats */
.novati-usage-stats {
    margin: 20px 0;
}

.novati-usage-stats h4 {
    margin: 0 0 15px;
}

.usage-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.usage-label {
    min-width: 100px;
    font-weight: 500;
}

.usage-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s;
}

.usage-fill.warning {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.usage-text {
    min-width: 60px;
    text-align: right;
    font-weight: 500;
    color: #666;
}

.usage-reset-info {
    margin-top: 15px;
    color: #999;
    font-size: 13px;
}

/* My Account Membership */
.novati-myaccount-membership {
    max-width: 800px;
}

.membership-current-level,
.membership-usage,
.membership-upgrade,
.membership-history {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.level-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.level-icon {
    font-size: 40px;
}

.level-info {
    flex: 1;
}

.level-name {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.level-price {
    color: #666;
}

.level-since {
    font-size: 13px;
    color: #999;
}

.level-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.level-features li {
    padding: 5px 0;
}

.level-features .check {
    color: #28a745;
    margin-right: 8px;
}

/* Usage Grid */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.usage-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.usage-card .usage-icon {
    font-size: 24px;
}

.usage-details {
    flex: 1;
}

.usage-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.usage-progress .usage-bar {
    flex: 1;
}

.usage-count {
    font-weight: 600;
    font-size: 14px;
}

.usage-na {
    color: #999;
    font-size: 13px;
}

/* Upgrade Options */
.upgrade-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.upgrade-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.upgrade-card h4 {
    margin: 0 0 10px;
}

.upgrade-price {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.upgrade-features li {
    padding: 5px 0;
}

.upgrade-features .new {
    color: #28a745;
    font-weight: bold;
    margin-right: 5px;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Dashboard Widget */
.novati-dashboard-membership {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.novati-dashboard-membership h3 {
    margin: 0 0 15px;
}

.dashboard-level {
    margin-bottom: 15px;
}

.dashboard-usage {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.usage-mini {
    font-size: 14px;
}

/* Upgrade Prompt */
.novati-upgrade-prompt,
.novati-login-prompt {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}

/* Upgrade CTA */
.novati-upgrade-cta {
    background: linear-gradient(135deg, #1a365d 0%, #2a4a7f 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.novati-upgrade-cta h3 {
    color: #fff;
    margin: 0 0 10px;
}

.novati-upgrade-cta p {
    margin: 0 0 20px;
    opacity: 0.9;
}

.novati-upgrade-cta .novati-btn-upgrade {
    background: #c9a227;
}

.novati-upgrade-cta .novati-btn-upgrade:hover {
    background: #b08d1f;
}

/* Responsive */
@media (max-width: 768px) {
    .novati-pricing-card.highlighted {
        transform: none;
    }
    
    .novati-pricing-card.highlighted:hover {
        transform: translateY(-5px);
    }
    
    .level-card {
        flex-direction: column;
        text-align: center;
    }
    
    .level-features ul {
        grid-template-columns: 1fr;
    }
    
    .dashboard-usage {
        flex-direction: column;
        gap: 10px;
    }
}
