/* HostHive Modern Order Form Theme - Bootstrap 5 Compatible */

/* Modern Color Palette */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 0.75rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, var(--primary-color) 100%);
}

/* Global Styles */
body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

.modern-orderform {
    background: var(--bg-secondary);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Progress Indicator Styles */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.checkout-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
    padding: 0 1rem;
}

.step-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: var(--primary-color);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Product Grid and Cards */
.products-grid {
    margin-top: 2rem;
}

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card-inner {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.product-card:hover .product-card-inner {
    box-shadow: var(--shadow-lg);
}

.stock-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.card-header.bg-gradient {
    background: var(--gradient-primary) !important;
    border: none;
}

.card-title {
    font-size: 1.25rem;
}

.product-description {
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-list {
    margin: 0;
    padding: 0;
}

.feature-item {
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-value {
    color: var(--primary-color);
}

.pricing-section {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.billing-cycle {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.setup-fee {
    margin-top: 0.5rem;
}

.order-now-btn {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.order-now-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Sidebar Styles */
.sidebar-categories {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-categories .list-group-item {
    border: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sidebar-categories .list-group-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.sidebar-categories .list-group-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

/* Form Elements */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .modern-orderform {
        padding: 1rem 0;
    }
    
    .checkout-progress {
        margin-bottom: 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .checkout-progress::before {
        display: none;
    }
    
    .step-circle {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .product-listing-header h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .price-amount {
        font-size: 1.5rem;
    }
    
    .pricing-section {
        padding: 1rem;
    }
    
    .sidebar-categories {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .checkout-progress .progress-step {
        padding: 0 0.5rem;
    }
    
    .product-listing-header h1 {
        font-size: 1.75rem;
    }
    
    .card-header {
        padding: 1.5rem 1rem;
    }
    
    .card-body, .card-footer {
        padding: 1rem;
    }
    
    .price-amount {
        font-size: 1.25rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Legacy Support for WHMCS Classes */
#order-standard_cart {
    background: transparent;
}

#order-hosthive {
    font-family: inherit;
}

/* Override Bootstrap defaults where needed */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    border: none;
    box-shadow: var(--shadow-sm);
}

.badge {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

/* Cart Items Styles */
.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--bg-tertiary);
}

.cart-items-header {
    background: var(--bg-tertiary) !important;
}

.product-details {
    padding: 0.5rem 0;
}

.product-name {
    color: var(--text-primary);
    line-height: 1.3;
}

.config-option {
    padding: 0.25rem 0;
}

.pricing-info .price {
    font-size: 1.25rem;
}

.quantity-controls input {
    max-width: 80px;
}

.addon-card {
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.addon-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.addon-card.addon-selected {
    border-color: var(--primary-color) !important;
    background: rgba(37, 99, 235, 0.05);
}

/* Complete Page Styles */
.completion-icon {
    animation: bounceIn 0.8s ease-out;
}

.order-number-display {
    background: var(--gradient-primary) !important;
    border-radius: var(--border-radius);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Configuration Form Styles */
.configuration-form .form-control,
.configuration-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.configuration-form .form-control:focus,
.configuration-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

.field-help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Sticky Sidebar */
.sticky-top {
    z-index: 1020;
}

/* Enhanced Responsive Design */
@media (max-width: 991px) {
    .configuration-header h1,
    .product-listing-header h1,
    .cart-header h1 {
        font-size: 2.5rem;
    }
    
    .card-header h3,
    .card-header h4,
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .pricing-info .price {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .configuration-header h1,
    .product-listing-header h1,
    .cart-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .card-body,
    .card-footer {
        padding: 1rem;
    }
    
    .order-number-display {
        padding: 2rem 1rem;
    }
    
    .order-number-display h2 {
        font-size: 1.5rem;
    }
    
    .completion-icon i {
        font-size: 3rem !important;
    }
}

/* Print Styles */
@media print {
    .checkout-progress,
    .sidebar-categories {
        display: none;
    }
    
    .modern-orderform {
        background: white;
        padding: 0;
    }
    
    .product-card-inner {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
