/**
 * Order Page Main Styles
 * 
 * Main CSS file with imports and base styles for the custom order page.
 * 
 * @package Custom_Order_Page
 * @author tathanhkhuong
 * @version 1.0.6
 * @updated 2025-08-04 16:38:28
 */

/* Import Section Styles */
@import url('sections/sticky-header.css');
@import url('sections/customer-notice.css');
@import url('sections/cart-table.css');
@import url('sections/buyer-info.css');
@import url('sections/shipping-section.css');
@import url('sections/coupon-field.css');
@import url('sections/payment-methods.css');
@import url('sections/sticky-footer.css');

/* CSS Reset & Base Styles */
* {
    box-sizing: border-box;
}

/* Container & Layout */
#custom-order-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.cop-container {
    width: 100%;
    position: relative;
}

/* Main Content Layout */
.cop-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 100px; /* Space for sticky footer */
}

.cop-checkout-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Section Base Styles */
.cop-section {
    width: 100%;
    margin-bottom: 24px;
}

.section-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.section-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.section-icon {
    font-size: 20px;
    filter: grayscale(0.2);
}

/* Form Elements Base */
.input-text,
.select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-text:focus,
.select:focus,
textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Button Base Styles */
.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #007cba;
    color: #fff;
    min-height: 44px;
}

.button:hover,
.btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.button:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.button:disabled,
.btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary Button */
.button-secondary {
    background: #6c757d;
    color: #fff;
}

.button-secondary:hover {
    background: #545b62;
}

/* Danger Button */
.button-danger {
    background: #dc3545;
    color: #fff;
}

.button-danger:hover {
    background: #c82333;
}

/* Loading Overlay */
.cop-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cop-spinner {
    text-align: center;
    color: #fff;
}

.cop-spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notice Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.woocommerce-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.woocommerce-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Progress Indicator */
.cop-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.cop-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #0099d9);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    #custom-order-page {
        padding: 12px;
    }
    
    .cop-main-content {
        gap: 16px;
        margin-bottom: 120px; /* More space for mobile footer */
    }
    
    .cop-checkout-sections {
        gap: 16px;
    }
    
    .section-container {
        padding: 16px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .button,
    .btn {
        padding: 14px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
    }
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .cop-checkout-sections {
        gap: 20px;
    }
    
    .section-container {
        padding: 24px;
    }
}

/* Desktop Layout */
@media (min-width: 1024px) {
    #custom-order-page {
        padding: 32px 20px;
    }
    
    .cop-main-content {
        gap: 32px;
    }
    
    .cop-checkout-sections {
        gap: 28px;
    }
    
    .section-container {
        padding: 28px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    #custom-order-page {
        max-width: none;
        padding: 0;
    }
    
    .cop-loading-overlay,
    .button,
    .btn {
        display: none !important;
    }
    
    .section-container {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .section-container {
        border-width: 2px;
    }
    
    .input-text,
    .select,
    textarea {
        border-width: 3px;
    }
    
    .button,
    .btn {
        border: 2px solid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cop-spinner-ring {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #custom-order-page {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .section-container {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .section-title {
        color: #e0e0e0;
        border-color: #404040;
    }
    
    .input-text,
    .select,
    textarea {
        background: #1a1a1a;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .input-text::placeholder {
        color: #888;
    }
}

/**
 * Main CSS Integration & Framework (2025-08-04 16:38:28):
 * 
 * Structure Framework:
 * - ✅ Modular CSS with @import for section styles
 * - ✅ Consistent container and layout system
 * - ✅ Base styles compatible with existing plugin framework
 * - ✅ Proper responsive breakpoints across all components
 * 
 * Design System:
 * - ✅ Consistent button and form element styling
 * - ✅ Loading states and progress indicators
 * - ✅ Notice message system integration
 * - ✅ Color scheme and typography standards
 * 
 * Accessibility Features:
 * - ✅ High contrast mode support
 * - ✅ Reduced motion preferences
 * - ✅ Keyboard focus states
 * - ✅ Screen reader friendly structure
 * 
 * Cross-Platform Support:
 * - ✅ Mobile-first responsive design
 * - ✅ Print stylesheet optimization
 * - ✅ Dark mode support
 * - ✅ iOS/Android touch target compliance
 * 
 * @author tathanhkhuong
 * @login tathanhkhuong
 * @updated 2025-08-04 16:38:28
 * @status main_css_complete
 */