/**
 * Axxess Order Form Custom Styles
 * Location: /templates/orderforms/axxesstheme/css/axxess.css
 */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container improvements */
.container-fluid, .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
.axxess-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 30px;
    border-radius: 20px;
    margin: 30px 0 50px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.axxess-header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.axxess-header .lead {
    font-size: 1.3em;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Wizard styles */
.axxess-order-wizard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wizard-header {
    text-align: center;
    margin-bottom: 30px;
}

.wizard-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.wizard-steps .step {
    padding: 10px 20px;
    margin: 0 10px 10px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wizard-steps .step.active {
    background: #007bff;
    color: white;
}

.wizard-steps .step.completed {
    background: #28a745;
    color: white;
}

/* Package selection styles */
.connection-types {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.connection-tab {
    padding: 15px 30px;
    margin: 0 10px 10px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.connection-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.connection-tab:hover {
    border-color: #007bff;
}

.connection-tab i {
    display: block;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.package-card {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    border-color: #007bff;
    box-shadow: 0 5px 15px rgba(0,123,255,0.1);
    transform: translateY(-5px);
}

.package-card.selected {
    border-color: #28a745;
    box-shadow: 0 5px 15px rgba(40,167,69,0.2);
}

.package-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.connection-type {
    margin-bottom: 10px;
}

.speed {
    font-size: 18px;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 15px;
}

.price {
    text-align: center;
    margin: 20px 0;
}

.price .amount {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

.price .period {
    color: #6c757d;
    font-size: 16px;
}

.data-cap {
    text-align: center;
    margin-bottom: 15px;
    color: #495057;
}

.features {
    color: #555;
    margin-bottom: 20px;
    min-height: 60px;
}

.btn-select-package {
    width: 100%;
    padding: 12px;
    font-weight: 600;
}

/* Coverage check styles */
.coverage-check {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.selected-package-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.coverage-widget {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
}

.address-input {
    margin-bottom: 20px;
}

.address-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.address-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 16px;
}

.address-input button {
    margin-top: 10px;
}

.coverage-result {
    margin-top: 20px;
}

.coverage-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Extras selection styles */
.extras-selection {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.router-selection, .addons-selection {
    margin-bottom: 30px;
}

.router-selection h3, .addons-selection h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.router-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.router-option {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.router-option input[type="radio"] {
    display: none;
}

.router-option label {
    display: block;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.router-option input[type="radio"]:checked + label {
    background: #e3f2fd;
    border-color: #007bff;
}

.router-option label strong {
    display: block;
    margin-bottom: 5px;
}

.router-option label span {
    display: block;
    color: #6c757d;
    margin-bottom: 10px;
}

.router-option label .price {
    color: #28a745;
    font-weight: bold;
    text-align: left;
    margin: 0;
}

.addon-list {
    space-y: 10px;
}

.addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.addon-item:hover {
    background: #f8f9fa;
}

.addon-item input[type="checkbox"] {
    margin-right: 15px;
}

.addon-details {
    flex: 1;
}

.addon-details strong {
    display: block;
    margin-bottom: 5px;
}

.addon-details small {
    color: #6c757d;
}

.addon-price {
    font-weight: bold;
    color: #28a745;
}

.order-summary-sidebar {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    position: sticky;
    top: 20px;
}

.order-summary-sidebar h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    font-weight: bold;
    color: #28a745;
    font-size: 18px;
    padding: 10px 0;
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
}

.extras-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Delivery styles */
.delivery-info {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.delivery-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    outline: 0;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}

.form-row > .col, .form-row > [class*="col-"] {
    padding-right: 5px;
    padding-left: 5px;
}

.delivery-options {
    margin: 30px 0;
}

.delivery-options h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.delivery-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.delivery-option:hover {
    background: #f8f9fa;
}

.delivery-option input[type="radio"] {
    margin-right: 15px;
}

.option-details {
    flex: 1;
}

.option-details strong {
    display: block;
    margin-bottom: 5px;
}

.option-details small {
    color: #6c757d;
}

.option-price {
    font-weight: bold;
    color: #28a745;
}

.installation-scheduling {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.installation-scheduling h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.delivery-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Account styles */
.account-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.account-options {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.account-option {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 30px;
    margin: 0 15px 15px;
    text-align: center;
    width: 300px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.account-option:hover {
    border-color: #007bff;
}

.account-option.active {
    border-color: #007bff;
    background: #e3f2fd;
}

.account-option h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.account-option p {
    margin-bottom: 20px;
    color: #6c757d;
}

.account-option button {
    width: 100%;
}

#account-form-container {
    margin-top: 30px;
}

.new-account-form, .login-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.account-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Review styles */
.review-order {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.review-container {
    margin-bottom: 30px;
}

.review-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.review-section:last-child {
    border-bottom: none;
}

.review-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.review-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.review-item:last-child {
    margin-bottom: 0;
}

.item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-details {
    color: #6c757d;
    font-size: 14px;
}

.item-address {
    font-weight: 500;
}

.item-method {
    color: #007bff;
    font-weight: 500;
    margin-top: 5px;
}

.item-email, .item-phone {
    color: #6c757d;
    font-size: 14px;
}

.pricing-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-line:last-child {
    border-bottom: none;
}

.price-line.total {
    font-weight: bold;
    color: #28a745;
    font-size: 18px;
    padding: 10px 0;
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
}

.review-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 10px 20px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 18px;
    line-height: 1.5;
    border-radius: 5px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 3px;
}

/* Alert styles */
.alert {
    position: relative;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-dismissible {
    padding-right: 40px;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px 20px;
    color: inherit;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner for buttons */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1200px) {
    .packages-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .axxess-header {
        padding: 40px 20px;
    }
    
    .axxess-header h1 {
        font-size: 2.5em;
    }
    
    .axxess-header .lead {
        font-size: 1.2em;
    }
    
    .wizard-steps .step {
        padding: 8px 15px;
        margin: 0 5px 5px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .axxess-order-wizard {
        padding: 10px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .connection-types {
        flex-direction: column;
        align-items: center;
    }
    
    .connection-tab {
        width: 100%;
        max-width: 300px;
    }
    
    .router-grid {
        grid-template-columns: 1fr;
    }
    
    .account-options {
        flex-direction: column;
        align-items: center;
    }
    
    .account-option {
        width: 100%;
        max-width: 300px;
        margin: 0 0 15px 0;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row > .col, .form-row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }
    
    .delivery-actions, .extras-actions, .account-actions, .review-actions {
        flex-direction: column;
    }
    
    .delivery-actions button, .extras-actions button, .account-actions button, .review-actions button {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .container-fluid, .container {
        padding: 0 10px;
    }
    
    .axxess-header {
        padding: 30px 15px;
    }
    
    .axxess-header h1 {
        font-size: 2em;
    }
    
    .axxess-header .lead {
        font-size: 1em;
    }
    
    .wizard-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .wizard-steps .step {
        width: 100%;
        max-width: 300px;
        margin: 0 0 5px 0;
    }
    
    .package-card {
        padding: 15px;
    }
    
    .btn-select-package {
        font-size: 14px;
        padding: 10px;
    }
    
    .order-summary-sidebar {
        position: static;
        margin-top: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .package-card {
        border-color: #000;
    }
    
    .package-card:hover {
        border-color: #007bff;
    }
    
    .btn-select-package {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .package-card:hover {
        transform: none;
    }
    
    .btn-select-package:hover {
        transform: none;
    }
    
    .connection-tab:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .axxess-header {
        background: #f8f9fa !important;
        color: #333 !important;
        box-shadow: none;
    }
    
    .package-card {
        border: 2px solid #333 !important;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .btn-select-package {
        background: #fff !important;
        color: #333 !important;
        border: 2px solid #333 !important;
    }
    
    .wizard-steps {
        display: none;
    }
    
    .alert {
        display: none;
    }
    
    .btn {
        display: none;
    }
}