/**
 * NEXUS Payment Theme Custom Styles
 * 
 * This file contains custom CSS styles for the theme
 * All styles are written in pure CSS for better compatibility
 */

/* Custom Styles */
:root {
    --primary-blue: #2563eb;
    --primary-indigo: #4f46e5;
    --primary-purple: #9333ea;
    --gradient-start: #2563eb;
    --gradient-mid: #4f46e5;
    --gradient-end: #9333ea;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WooCommerce Checkout Form Styles */
.woocommerce-checkout .form-row {
    margin-bottom: 1.25rem;
}

.woocommerce-checkout .form-row label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.woocommerce-checkout .form-row label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row input[type="number"],
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woocommerce-checkout .form-row textarea {
    resize: vertical;
    min-height: 80px;
}

/* Flow Form Input Styles - Match React Component */
.checkout-flow-form input[type="text"],
.checkout-flow-form input[type="email"],
.checkout-flow-form input[type="tel"],
.checkout-flow-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: inherit;
}

.checkout-flow-form input:focus,
.checkout-flow-form textarea:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.checkout-flow-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.checkout-flow-form .text-red-500 {
    color: #ef4444;
}

/* Success/Error Messages */
.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.border-red-200 {
    border-color: #fecaca;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-700 {
    color: #15803d;
}

.text-green-800 {
    color: #166534;
}

.text-green-900 {
    color: #14532d;
}

.text-red-600 {
    color: #dc2626;
}

.text-red-700 {
    color: #b91c1c;
}

.text-red-800 {
    color: #991b1b;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

/* Checkout Button */
#place_order,
#nexus-submit-btn {
    width: 100%;
    margin-top: 2rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#place_order:hover,
#nexus-submit-btn:hover {
    background: linear-gradient(to right, #1d4ed8, #4338ca, #7e22ce);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

#place_order:disabled,
#nexus-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Flow form button specific styles */
#nexus-submit-btn {
    margin-top: 2rem;
}

/* Order Review Table */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

/* Hide order totals table in left side (order review section) - only show payment methods */
.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table {
    display: none;
}

/* Ensure Place Order button is visible and styled correctly */
#place_order {
    width: 100%;
    margin-top: 1.5rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#place_order:hover {
    background: linear-gradient(to right, #1d4ed8, #4338ca, #7e22ce);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

#place_order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.woocommerce-checkout-review-order-table th {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.woocommerce-checkout-review-order-table .cart-subtotal,
.woocommerce-checkout-review-order-table .shipping,
.woocommerce-checkout-review-order-table .order-total {
    font-weight: 600;
}

.woocommerce-checkout-review-order-table .order-total {
    font-size: 1.25rem;
    color: var(--primary-blue);
}

/* Payment Methods */
.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_methods li {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.wc_payment_methods li label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.wc_payment_methods li input[type="radio"] {
    margin: 0;
}

/* Notices */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding-left: 60px;
}

.woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.woocommerce-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.woocommerce-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-cols-1.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .sticky.top-24 {
        position: relative;
        top: 0;
    }
}

/* Additional utility classes */
.items-start {
    align-items: flex-start;
}

.leading-relaxed {
    line-height: 1.625;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.pb-12 {
    padding-bottom: 3rem;
}

/* Loading State */
.woocommerce-checkout-processing {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Fields */
.nexus-custom-fields {
    margin-top: 0rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--gradient-start), var(--gradient-end));
}

.bg-gradient-to-br.from-blue-50.via-white.to-indigo-50 {
    background-image: linear-gradient(to bottom right, #eff6ff, #ffffff, #eef2ff);
}

.text-gradient {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.text-transparent {
    color: transparent;
}

.bg-gradient-to-r.from-blue-600.to-purple-600 {
    background-image: linear-gradient(to right, #2563eb, #9333ea);
}

.bg-gradient-to-r.from-blue-600.via-indigo-600.to-purple-600 {
    background-image: linear-gradient(to right, #2563eb, #4f46e5, #9333ea);
}

/* Layout Utilities */
.min-h-screen {
    min-height: 100vh;
}

.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.mt-16 {
    margin-top: 4rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* Color Utilities */
.text-white {
    color: #ffffff;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.text-blue-600 {
    color: #2563eb;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-700 {
    color: #15803d;
}

.text-green-800 {
    color: #166534;
}

.text-green-900 {
    color: #14532d;
}

.text-purple-600 {
    color: #9333ea;
}

.text-indigo-600 {
    color: #4f46e5;
}

.text-red-500 {
    color: #ef4444;
}

.text-red-600 {
    color: #dc2626;
}

.text-red-700 {
    color: #b91c1c;
}

.text-red-800 {
    color: #991b1b;
}

/* Background Utilities */
.bg-white {
    background-color: #ffffff;
}

.bg-white\/80 {
    background-color: rgba(255, 255, 255, 0.8);
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-indigo-50 {
    background-color: #eef2ff;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.bg-green-100 {
    background-color: #dcfce7;
}

/* Border Utilities */
.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-blue-100 {
    border-color: #dbeafe;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.border-red-200 {
    border-color: #fecaca;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-red-300 {
    border-color: #fca5a5;
}

/* Focus Ring Utilities */
.focus\:ring-2:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-blue-500:focus {
    --tw-ring-color: #3b82f6;
}

.focus\:border-transparent:focus {
    border-color: transparent;
}

/* Border Radius */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadow Utilities */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Position Utilities */
.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.top-24 {
    top: 6rem;
}

.z-50 {
    z-index: 50;
}

/* Spacing Utilities */
.w-full {
    width: 100%;
}

.w-10 {
    width: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.h-10 {
    height: 2.5rem;
}

.h-12 {
    height: 3rem;
}

.h-48 {
    height: 12rem;
}

/* Display Utilities */
.hidden {
    display: none;
}

/* Responsive */
@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sm\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .sm\:py-12 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .sm\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }
    
    .sm\:inline {
        display: inline;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Backdrop Blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Hover Effects */
.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover\:bg-white\/30:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Button with hover gradient states */
.bg-gradient-to-r.hover\:from-blue-700:hover {
    background-image: linear-gradient(to right, #1d4ed8, var(--gradient-mid), var(--gradient-end)) !important;
}

.bg-gradient-to-r.hover\:via-indigo-700:hover {
    background-image: linear-gradient(to right, var(--gradient-start), #4338ca, var(--gradient-end)) !important;
}

.bg-gradient-to-r.hover\:to-purple-700:hover {
    background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-mid), #7e22ce) !important;
}

/* Combined hover state for gradient button */
.bg-gradient-to-r.hover\:from-blue-700.hover\:via-indigo-700.hover\:to-purple-700:hover {
    background-image: linear-gradient(to right, #1d4ed8, #4338ca, #7e22ce) !important;
}

/* Disabled States */
.disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

/* Object Fit */
.object-contain {
    object-fit: contain;
}

.object-cover {
    object-fit: cover;
}

/* Brightness */
.brightness-0 {
    filter: brightness(0);
}

.invert {
    filter: invert(1);
}

/* Space Utilities */
.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-5 > * + * {
    margin-top: 1.25rem;
}

/* Margin Utilities */
.ml-2 {
    margin-left: 0.5rem;
}

.ml-4 {
    margin-left: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

.pt-8 {
    padding-top: 2rem;
}

/* Padding Utilities */
.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Display Utilities */
.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

/* Text Size Utilities */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-9xl {
    font-size: 8rem;
    line-height: 1;
}

/* Whitespace Utilities */
.whitespace-nowrap {
    white-space: nowrap;
}

/* Resize Utilities */
.resize-none {
    resize: none;
}

/* Object Position */
.object-top {
    object-position: top;
}

/* Flex Direction */
.flex-col {
    flex-direction: column;
}

/* Justify Content */
.justify-center {
    justify-content: center;
}

/* Items Center */
.items-center {
    align-items: center;
}

/* Prose Styles for Content */
.prose {
    color: #374151;
    max-width: 65ch;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
    line-height: 1.2;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
}

.max-w-none {
    max-width: none;
}

.max-w-4xl {
    max-width: 56rem;
}

/* Thank You Page Styles */
.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.w-24 {
    width: 6rem;
}

.h-24 {
    height: 6rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-red-600 {
    background-color: #dc2626;
}

.bg-red-700 {
    background-color: #b91c1c;
}

.border-red-100 {
    border-color: #fee2e2;
}

.text-red-600 {
    color: #dc2626;
}

.text-red-700 {
    color: #b91c1c;
}

.text-red-800 {
    color: #991b1b;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.text-green-800 {
    color: #166534;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.inline-block {
    display: inline-block;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.last\:border-0:last-child {
    border-width: 0;
}

.last\:pb-0:last-child {
    padding-bottom: 0;
}

.prose a.text-white {
    color: #fff !important;
}


/* Hide entry-header on order-received/thankyou page */
.woocommerce-order-received .entry-header,
.woocommerce-thankyou .entry-header,
body.woocommerce-order-received .entry-header,
body.woocommerce-thankyou .entry-header {
    display: none !important;
}