/**
 * Modern Plans Design - Golden Hosting Services
 * 🎨 Premium, Beautiful & Professional Pricing Cards
 * ✨ The Most Beautiful Plugin Design for Hosting Companies
 */

/* ===== Modern Container ===== */
.ghs-subscription-options-modern {
    max-width: 100%;
    width: 100%;
    margin: 40px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    z-index: 1;
    clear: both;
    background: transparent;
}

/* ===== Features Highlight Section ===== */
.ghs-features-highlight {
    /* Background gradient controlled by Color Settings */
    border-radius: 0 !important;
    padding: 40px 30px !important;
    margin: 0 -20px 30px -20px !important;
    color: white !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

.ghs-features-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.4;
    z-index: 0;
}

.ghs-features-highlight > * {
    position: relative;
    z-index: 1;
}

.ghs-features-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
}

.ghs-star-icon {
    width: 24px;
    height: 24px;
    /* Color controlled by Color Settings */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ghs-features-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.3px;
}

.ghs-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.ghs-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 16px 14px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghs-feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ghs-feature-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2;
    flex-shrink: 0;
    /* Color controlled by Color Settings */
}

.ghs-feature-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ghs-feature-item strong {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.ghs-feature-item span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}

/* ===== Plans Header ===== */
.ghs-plans-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.ghs-plans-header h3 {
    font-size: 26px !important;
    font-weight: 700 !important;
    /* Color controlled by Color Settings */
    margin: 0 0 10px 0 !important;
    letter-spacing: -0.5px !important;
}

.ghs-plans-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ===== Plans Grid ===== */
.ghs-plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
    padding: 0 20px;
}

/* ===== Plan Card ===== */
.ghs-plan-card {
    position: relative;
    border-radius: 16px;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ghs-plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ghs-plan-card label {
    display: block !important;
    cursor: pointer !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    height: 100% !important;
    min-height: 260px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
}

.ghs-plan-card:hover label {
    transform: translateY(-4px) !important;
    /* Border color controlled by Color Settings */
}

.ghs-plan-card input[type="radio"]:checked + label {
    /* Border and background controlled by Color Settings */
    border-width: 2px !important;
    transform: translateY(-3px) !important;
}

/* ===== Popular Badge ===== */
.ghs-plan-popular label {
    border-color: #fbbf24;
}

.ghs-plan-popular input[type="radio"]:checked + label {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.3);
}

.ghs-plan-best label {
    border-color: #10b981;
}

.ghs-plan-best input[type="radio"]:checked + label {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
}

/* ===== Plan Badge ===== */
.ghs-plan-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    padding: 5px 12px;
    border-radius: 0 14px 0 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.ghs-badge-popular {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ghs-badge-best {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== Plan Header ===== */
.ghs-plan-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.ghs-plan-header h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 6px 0 !important;
    letter-spacing: -0.3px !important;
    text-align: center !important;
}

.ghs-plan-save {
    display: inline-block;
    /* Background controlled by Color Settings */
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 auto;
    text-align: center;
}

/* ===== Plan Price ===== */
.ghs-plan-price {
    margin-bottom: 14px;
    text-align: center;
}

.ghs-price-main {
    font-size: 28px !important;
    font-weight: 800 !important;
    /* Color controlled by Color Settings */
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
    letter-spacing: -1px !important;
}

.ghs-plan-popular .ghs-price-main {
    color: #f59e0b;
}

.ghs-plan-best .ghs-price-main {
    color: #10b981;
}

.ghs-price-main .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

.ghs-price-monthly {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    background: #f1f5f9 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    display: inline-block !important;
}

/* ===== Plan Savings ===== */
.ghs-plan-savings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #d1fae5;
    color: #065f46;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ghs-plan-savings svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* ===== Plan Select Button ===== */
.ghs-plan-select {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    padding: 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
}

.ghs-plan-card input[type="radio"]:checked + label .ghs-plan-select {
    /* Background and border controlled by Color Settings */
    color: white !important;
}

.ghs-plan-popular input[type="radio"]:checked + label .ghs-plan-select {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.ghs-plan-best input[type="radio"]:checked + label .ghs-plan-select {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ghs-check-icon {
    width: 16px;
    height: 16px;
    stroke-width: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ghs-plan-card input[type="radio"]:checked + label .ghs-check-icon {
    opacity: 1;
}

.ghs-plan-card input[type="radio"]:checked + label .ghs-select-text {
    display: none;
}

.ghs-plan-card input[type="radio"]:checked + label .ghs-check-icon::before {
    content: "✓ Selected";
    position: absolute;
    font-size: 15px;
    font-weight: 600;
    margin-left: -60px;
}

/* ===== Auto Renewal ===== */
.ghs-auto-renewal-option {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 25px;
    margin: 25px 20px 0 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.ghs-auto-renewal-option:hover {
    /* Border color controlled by Color Settings */
    transform: translateY(-1px);
}

.ghs-auto-renewal-option label {
    display: flex !important;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 0;
}

.ghs-auto-renewal-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    /* Accent color controlled by Color Settings */
    border-radius: 4px;
}

.ghs-auto-renewal-option span {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.2px;
}

.ghs-auto-renewal-description {
    margin: 10px 0 0 35px !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.6;
    font-weight: 400;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .ghs-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .ghs-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ghs-subscription-options-modern {
        padding: 0 10px;
    }
    
    .ghs-features-highlight {
        padding: 25px 20px;
        border-radius: 0;
    }
    
    .ghs-features-header h3 {
        font-size: 18px;
    }
    
    .ghs-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ghs-plans-header h3 {
        font-size: 22px !important;
    }
    
    .ghs-plans-header p {
        font-size: 13px;
    }
    
    .ghs-plans-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .ghs-plan-card label {
        padding: 18px 16px;
        min-height: 240px;
    }
    
    .ghs-plan-header h4 {
        font-size: 17px !important;
    }
    
    .ghs-price-main {
        font-size: 26px !important;
    }
    
    .ghs-auto-renewal-option {
        padding: 18px 16px;
        margin: 20px 10px 0 10px;
    }
}

@media (max-width: 480px) {
    .ghs-features-highlight {
        padding: 20px 15px;
    }
    
    .ghs-features-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .ghs-features-header h3 {
        font-size: 16px;
        text-align: center;
    }
    
    .ghs-feature-item {
        padding: 14px 12px;
    }
    
    .ghs-plans-header h3 {
        font-size: 20px !important;
    }
    
    .ghs-plans-header p {
        font-size: 12px;
    }
    
    .ghs-plan-card label {
        padding: 16px 14px;
    }
    
    .ghs-plan-header h4 {
        font-size: 16px !important;
    }
    
    .ghs-price-main {
        font-size: 24px !important;
    }
    
    .ghs-price-monthly {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
    
    .ghs-auto-renewal-option {
        padding: 16px 14px;
    }
    
    .ghs-auto-renewal-option span {
        font-size: 13px;
    }
    
    .ghs-auto-renewal-description {
        font-size: 11px !important;
        margin-left: 0 !important;
    }
}

/* ===== Fix WooCommerce Conflicts ===== */
.product .ghs-subscription-options-modern {
    margin-top: 60px;
    margin-bottom: 60px;
}

/* Make the section full width below product summary */
.woocommerce div.product .ghs-subscription-options-modern {
    width: 100%;
    max-width: 100%;
    clear: both;
    float: none;
    padding: 35px 20px;
    background: #f9fafb;
    border-radius: 0;
}

/* Hide quantity selector for service products */
.single-product div.product form.cart div.quantity,
.woocommerce div.product form.cart div.quantity,
div.product form.cart div.quantity {
    display: none !important;
    visibility: hidden !important;
}

/* Move cart form to bottom */
.woocommerce div.product .summary {
    display: flex;
    flex-direction: column;
}

.woocommerce div.product .summary form.cart {
    order: 999 !important;
    margin-top: 0 !important;
}

/* Position add to cart button after subscription options */
.woocommerce .ghs-subscription-options-modern + form.cart,
.woocommerce div.product form.cart {
    margin-top: 30px !important;
    width: 100%;
    text-align: center;
}

/* Style the add to cart button */
.single-product div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .single_add_to_cart_button,
div.product form.cart button.single_add_to_cart_button {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 18px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    /* Background controlled by Color Settings */
    border: none !important;
    border-radius: 12px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.single-product div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart .single_add_to_cart_button:hover,
div.product form.cart button.single_add_to_cart_button:hover {
    /* Background controlled by Color Settings */
    transform: translateY(-3px) !important;
}

/* Add to cart wrapper styling */
.ghs-add-to-cart-wrapper {
    text-align: center !important;
    margin: 40px auto !important;
    max-width: 600px !important;
    padding: 0 20px !important;
}

.ghs-add-to-cart-wrapper form.cart {
    margin: 0 !important;
}

/* Ensure WooCommerce buttons stay on top */
.single-product .product .cart,
.single-product .product .summary .cart {
    position: relative;
    z-index: 10;
}

/* Fix for product images */
.woocommerce-product-gallery {
    position: relative;
    z-index: 2;
}

/* Fix for product meta */
.product_meta {
    position: relative;
    z-index: 2;
}

/* ===== Animations ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ghs-plan-card {
    animation: slideIn 0.5s ease-out;
}

.ghs-plan-card:nth-child(1) { animation-delay: 0.1s; }
.ghs-plan-card:nth-child(2) { animation-delay: 0.2s; }
.ghs-plan-card:nth-child(3) { animation-delay: 0.3s; }
.ghs-plan-card:nth-child(4) { animation-delay: 0.4s; }
