/**
 * Brezenshop Checkout Styles
 */

/* Progress Bar */
.brezen-checkout-progress {
    padding: 30px 0;
    margin-bottom: 40px;
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    gap: 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    flex: 1 1 0;
    min-width: 0;
    max-width: 200px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: #0073aa;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
}

.progress-step.completed .step-number {
    background: #46b450;
    color: #fff;
}

.step-info {
    width: 100%;
}

.step-title {
    font-weight: bold;
    font-size: 14px;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-description {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-connector {
    flex: 0 0 30px;
    height: 2px;
    background: #ddd;
    margin: 0 5px;
    margin-top: -50px;
    transition: background 0.3s;
}

.progress-connector.completed {
    background: #46b450;
}

/* Responsive Progress Bar */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-step {
        width: 100%;
    }
    
    .progress-connector {
        display: none;
    }
}

/* Checkout Wrapper - volle Breite, kein padding */
.brezen-checkout-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Checkout Steps Container - gleiche Breite wie Progress Bar */
.brezen-checkout-steps {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.brezen-checkout-step {
    background: #fff;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
    width: 1200px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Step 1 (Bestellung) bündig mit Progress Bar */
.brezen-checkout-step[data-step="1"] {
    width: 1200px;
    max-width: 1200px;
    padding: 40px 60px;
    margin: 0 auto;
}

.brezen-checkout-step[data-step="1"] .brezen-cart-overview {
    width: 100%;
    max-width: 100%;
}

.brezen-checkout-step[data-step="1"] table {
    width: 100%;
    table-layout: auto;
    min-width: 100%;
}

.brezen-checkout-step[data-step="1"] .shop_table {
    width: 100% !important;
}

.step-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.step-description {
    color: #666;
    margin-bottom: 30px;
}

.step-content {
    margin-bottom: 30px;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.step-navigation button {
    min-width: 150px;
    padding: 12px 24px;
    font-size: 16px;
}

/* Shipping Method Selector */
.brezen-shipping-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.brezen-shipping-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.brezen-shipping-method:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brezen-shipping-method.selected {
    border-color: #0073aa;
    background: #f0f8ff;
}

.method-icon {
    font-size: 40px;
    color: #0073aa;
}

.method-content h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.method-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.method-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #0073aa;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s;
}

.brezen-shipping-method.selected .method-check {
    opacity: 1;
}

/* Cart Overview */
.brezen-cart-overview table {
    width: 100%;
    border-collapse: collapse;
}

.brezen-cart-overview th,
.brezen-cart-overview td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.brezen-cart-overview tfoot {
    font-weight: bold;
}

/* Location Selector */
.brezen-location-selector {
    margin-top: 20px;
}

.brezen-pickup-selection,
.brezen-delivery-selection {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-row .input-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.required {
    color: #dc3232;
}

/* Customer Data */
.brezen-customer-data .woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Payment Section */
.brezen-payment-section {
    margin-top: 20px;
}

.brezen-order-review {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Step 2 (Bezahlung) bündig mit Progress Bar */
.brezen-checkout-step[data-step="2"] {
    width: 1200px;
    max-width: 1200px;
    padding: 40px 60px;
    margin: 0 auto;
}

.brezen-checkout-step[data-step="2"] .brezen-order-review {
    width: 100%;
    max-width: 100%;
}

/* Order Review Tabelle besser formatieren */
.brezen-order-review table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}

.brezen-order-review .shop_table {
    width: 100% !important;
}

.brezen-order-review th,
.brezen-order-review td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.brezen-order-review th {
    font-weight: bold;
    background: #f5f5f5;
}

.brezen-order-review thead th {
    border-bottom: 2px solid #0073aa;
}

.brezen-order-review tfoot th,
.brezen-order-review tfoot td {
    font-weight: bold;
    border-top: 2px solid #0073aa;
    border-bottom: none;
}

.brezen-order-review .product-name {
    font-weight: 600;
    min-width: 600px;
    width: 60%;
}

/* Product-Name Spalte auch in Step 1 Cart breiter */
.brezen-checkout-step[data-step="1"] .product-name,
.brezen-checkout-step[data-step="1"] td.product-name,
.brezen-checkout-step[data-step="1"] th.product-name {
    min-width: 600px;
    width: 60%;
}

.brezen-checkout-step[data-step="1"] .product-quantity,
.brezen-checkout-step[data-step="1"] .product-total {
    width: auto;
    white-space: nowrap;
}

.brezen-order-review .product-total {
    text-align: right;
    white-space: nowrap;
}

/* On checkout: hide shipping radio buttons but show the shipping total row */
.brezen-checkout-wrapper .woocommerce-shipping-methods li {
    list-style: none;
    padding: 0;
    margin: 0;
}
.brezen-checkout-wrapper .woocommerce-shipping-methods input[type="radio"],
.brezen-checkout-wrapper .woocommerce-shipping-methods input[type="hidden"] {
    display: none !important;
}

/* Show our custom shipping cost row if present */
.brezen-shipping-row {
    display: table-row !important;
}

/* Hide ALL shipping on cart page (calculator, methods, rows) */
.woocommerce-cart .shipping,
.woocommerce-cart .shipping-calculator-form,
.woocommerce-cart .woocommerce-shipping-calculator,
.woocommerce-cart .woocommerce-shipping-methods,
.woocommerce-cart .woocommerce-shipping-totals,
.woocommerce-cart #shipping_method {
    display: none !important;
}

/* Section styling for Step 1 */
.brezen-section h4 {
    font-size: 18px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0073aa;
    color: #1d2327;
}

/* Fix overlapping labels in Sonderwünsche (override theme floating labels) */
.brezen-sonderwuensche .form-row label {
    position: static !important;
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    line-height: 1.4 !important;
}

.brezen-sonderwuensche .form-row {
    position: relative;
}

.brezen-sonderwuensche select,
.brezen-sonderwuensche input,
.brezen-sonderwuensche textarea {
    margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .brezen-checkout-wrapper {
        padding: 10px;
    }
    
    .brezen-checkout-step {
        padding: 20px;
    }
    
    .brezen-shipping-methods {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
    }
    
    .step-navigation button {
        width: 100%;
    }
}
