/**
 * OLSCMS Stripe Checkout Styles
 * 
 * Styling for pricing cards, checkout buttons, portal
 * 
 * @package OLSCMS
 * @since 4.0.0
 */

/* === PRICING SECTION === */
.olscms-pricing {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.olscms-pricing__header {
    text-align: center;
    margin-bottom: 48px;
}

.olscms-pricing__title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
}

.olscms-pricing__subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* === PLAN CARDS === */
.olscms-pricing__plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.olscms-plan {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: all 0.3s ease;
}

.olscms-plan:hover {
    border-color: #3B8E5A;
    box-shadow: 0 8px 24px rgba(59, 142, 90, 0.15);
    transform: translateY(-4px);
}

.olscms-plan--featured {
    border-color: #3B8E5A;
    box-shadow: 0 4px 20px rgba(59, 142, 90, 0.2);
}

.olscms-plan__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3B8E5A, #2D6E46);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.olscms-plan__name {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px;
    text-align: center;
}

.olscms-plan__desc {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 24px;
}

.olscms-plan__price {
    text-align: center;
    margin-bottom: 24px;
}

.olscms-plan__amount {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.olscms-plan__currency {
    font-size: 24px;
    vertical-align: super;
    margin-right: 4px;
}

.olscms-plan__period {
    font-size: 16px;
    color: #666;
    margin-top: 4px;
}

.olscms-plan__savings {
    display: inline-block;
    background: #e8f5e9;
    color: #27ae60;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    margin-top: 8px;
}

/* Features List */
.olscms-plan__features {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}

.olscms-plan__feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.olscms-plan__feature:last-child {
    border-bottom: none;
}

.olscms-plan__feature-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #27ae60;
}

/* === CHECKOUT BUTTON === */
.olscms-checkout-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #FFBC27;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.olscms-checkout-btn:hover {
    background: #E5A820;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.olscms-checkout-btn:active {
    transform: translateY(0);
}

.olscms-checkout-btn:disabled,
.olscms-checkout-btn--loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.olscms-checkout-btn--loading {
    position: relative;
    color: transparent;
}

.olscms-checkout-btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: olscms-spin 0.8s linear infinite;
}

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

/* Secondary button */
.olscms-checkout-btn--secondary {
    background: transparent;
    color: #3B8E5A;
    border: 2px solid #3B8E5A;
}

.olscms-checkout-btn--secondary:hover {
    background: #3B8E5A;
    color: #fff;
}

/* === MANAGE SUBSCRIPTION === */
.olscms-subscription-manage {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.olscms-subscription-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.olscms-subscription-card__header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 24px;
}

.olscms-subscription-card__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.olscms-subscription-card__status--active {
    background: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
}

.olscms-subscription-card__status--canceled {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.olscms-subscription-card__plan {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.olscms-subscription-card__body {
    padding: 24px;
}

.olscms-subscription-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.olscms-subscription-info__item {
    padding: 12px;
    background: #f5f6fa;
    border-radius: 8px;
}

.olscms-subscription-info__label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.olscms-subscription-info__value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.olscms-subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === PORTAL BUTTON === */
.olscms-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #f5f6fa;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.olscms-portal-btn:hover {
    background: #e8e9f0;
}

.olscms-portal-btn svg {
    width: 18px;
    height: 18px;
}

/* === SUCCESS/CANCEL PAGES === */
.olscms-checkout-result {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 20px;
}

.olscms-checkout-result__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.olscms-checkout-result__icon--success {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.olscms-checkout-result__icon--error {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.olscms-checkout-result__icon svg {
    width: 40px;
    height: 40px;
}

.olscms-checkout-result__title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.olscms-checkout-result__message {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* === TRIAL BANNER === */
.olscms-trial-banner {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: #1a1a2e;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.olscms-trial-banner__text {
    font-weight: 500;
}

.olscms-trial-banner__days {
    font-weight: 700;
}

.olscms-trial-banner__btn {
    background: #1a1a2e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.olscms-trial-banner__btn:hover {
    opacity: 0.9;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .olscms-pricing__title {
        font-size: 28px;
    }
    
    .olscms-plan {
        padding: 24px;
    }
    
    .olscms-plan__amount {
        font-size: 40px;
    }
    
    .olscms-subscription-info {
        grid-template-columns: 1fr;
    }
    
    .olscms-trial-banner {
        flex-direction: column;
        text-align: center;
    }
}
