/**
 * ServiceWerx Pricing Plugin Styles
 */

/* Pricing Wrapper */
.sw-pricing-wrapper {
    display: grid;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.sw-pricing-wrapper.sw-columns-1 {
    grid-template-columns: 1fr;
    max-width: 600px;
}

.sw-pricing-wrapper.sw-columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.sw-pricing-wrapper.sw-columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Pricing Card */
.sw-pricing-card {
    position: relative;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sw-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sw-pricing-card.sw-popular {
    border-color: #3b82f6;
    border-width: 3px;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
}

/* Popular Badge */
.sw-popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Header */
.sw-pricing-header {
    margin-bottom: 1.5rem;
}

.sw-plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.sw-plan-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Pricing */
.sw-pricing-price {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f3f4f6;
}

.sw-price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.sw-price-period {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.sw-price-savings {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
}

/* Features List */
.sw-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.sw-feature-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    gap: 0.75rem;
}

.sw-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #dbeafe;
    color: #3b82f6;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.sw-feature-text {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.5;
}

/* Footer / CTA */
.sw-pricing-footer {
    margin-top: auto;
}

.sw-pricing-cta {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #3b82f6;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.sw-pricing-cta:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: white;
    text-decoration: none;
}

.sw-pricing-card.sw-popular .sw-pricing-cta {
    background: #2563eb;
}

.sw-pricing-card.sw-popular .sw-pricing-cta:hover {
    background: #1d4ed8;
}

/* Error State */
.sw-pricing-error {
    padding: 2rem;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sw-pricing-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .sw-pricing-card {
        padding: 1.5rem;
    }
    
    .sw-price-amount {
        font-size: 2.5rem;
    }
    
    .sw-popular-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Billing Toggle (if added later) */
.sw-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sw-billing-toggle label {
    font-weight: 600;
    color: #374151;
}

.sw-billing-toggle input[type="checkbox"] {
    width: 48px;
    height: 24px;
}

/* Loading State */
.sw-pricing-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.sw-pricing-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: sw-spin 1s linear infinite;
    margin-top: 1rem;
}

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

/* Admin Settings Page Styles */
.wrap .servicewerx-pricing-settings {
    max-width: 800px;
}

.wrap .servicewerx-pricing-settings input[type="url"],
.wrap .servicewerx-pricing-settings input[type="number"] {
    width: 100%;
    max-width: 500px;
}

.wrap .servicewerx-pricing-settings .description {
    font-style: italic;
    color: #666;
}
