/*
 * Scoped styling for Nabestel Widget
 * Unique ID Suffix: 5e76c715
 */

.nabestellen-module {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1D1F21;
    background-color: #F4F4F4;
    padding: 60px 20px;
    box-sizing: border-box;
}

.nabestellen-module * {
    box-sizing: border-box;
}

.nabestellen-module .nabestel-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Intro Section */
.nabestellen-module .nabestel-intro {
    max-width: 800px;
    margin-bottom: 40px;
}

.nabestellen-module .nabestel-eyebrow {
    display: inline-block;
    color: #9BB33B;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.nabestellen-module .nabestel-main-title {
    color: #2F3F4C;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px 0;
}

.nabestellen-module .nabestel-subtitle {
    color: #687177;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Grid Layout */
.nabestellen-module .nabestel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 850px) {
    .nabestellen-module .nabestel-grid {
        grid-template-columns: 1fr 360px;
    }
}

/* Left Column - Products */
.nabestellen-module .nabestel-section-title {
    color: #2F3F4C;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.nabestellen-module .nabestel-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Product Card */
.nabestellen-module .nabestel-product-card {
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    border: 1px solid #DFE3E6;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    border-left: 4px solid #94C9D5;
}

@media (min-width: 600px) {
    .nabestellen-module .nabestel-product-card {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        min-height: 120px;
    }
}

.nabestellen-module .nabestel-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: #94C9D5;
}

/* Selected State */
.nabestellen-module .nabestel-product-card.is-selected {
    border-color: #9BB33B;
    border-left-color: #9BB33B;
    background-color: #EDF3DA;
}

.nabestellen-module .nabestel-product-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #F4F4F4;
    flex-shrink: 0;
    margin-bottom: 12px;
}

@media (min-width: 600px) {
    .nabestellen-module .nabestel-product-image {
        margin-bottom: 0;
    }
}

.nabestellen-module .nabestel-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nabestellen-module .nabestel-product-info {
    flex-grow: 1;
}

.nabestellen-module .nabestel-product-art {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #687177;
    margin-bottom: 4px;
}

.nabestellen-module .nabestel-product-title {
    color: #2F3F4C;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.nabestellen-module .nabestel-product-desc {
    font-size: 13px;
    color: #687177;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.nabestellen-module .nabestel-product-instruction {
    display: inline-block;
    font-size: 11px;
    color: #2F3F4C;
    background-color: #DFE3E6;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.nabestellen-module .nabestel-product-card.is-selected .nabestel-product-instruction {
    background-color: #FFFFFF;
}

.nabestellen-module .nabestel-product-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    border-top: 1px solid #DFE3E6;
    padding-top: 12px;
}

@media (min-width: 600px) {
    .nabestellen-module .nabestel-product-action {
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        min-width: 110px;
    }
}

.nabestellen-module .nabestel-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #2F3F4C;
}

/* Qty Selector */
.nabestellen-module .nabestel-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #DFE3E6;
    border-radius: 6px;
    overflow: hidden;
    background-color: #FFFFFF;
    height: 32px;
}

.nabestellen-module .nabestel-qty-btn {
    width: 32px;
    height: 100%;
    border: none;
    background: none;
    color: #2F3F4C;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.nabestellen-module .nabestel-qty-btn:hover {
    background-color: #F4F4F4;
}

.nabestellen-module .nabestel-qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #2F3F4C;
}

/* Card Added Badge */
.nabestellen-module .nabestel-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #9BB33B;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: none;
}

.nabestellen-module .nabestel-product-card.is-selected .nabestel-card-badge {
    display: block;
}

/* Right Column - Checkout Card */
.nabestellen-module .nabestel-checkout-column {
    position: relative;
}

.nabestellen-module .nabestel-checkout-card {
    background-color: #FFFFFF;
    border: 1px solid #DFE3E6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

@media (min-width: 850px) {
    .nabestellen-module .nabestel-checkout-card-sticky {
        position: -webkit-sticky;
        position: sticky;
        top: 100px;
        align-self: start;
    }
    
    body.admin-bar .nabestellen-module .nabestel-checkout-card-sticky {
        top: calc(var(--wp-admin--admin-bar--height, 32px) + 100px);
    }
}

.nabestellen-module .nabestel-checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nabestellen-module .nabestel-checkout-title {
    color: #2F3F4C;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.nabestellen-module .nabestel-checkout-badge {
    background-color: #9BB33B;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Order Summary */
.nabestellen-module .nabestel-summary {
    background-color: #F4F4F4;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 24px;
}

.nabestellen-module .nabestel-summary-empty {
    color: #687177;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.nabestellen-module .nabestel-summary-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
    border-bottom: 1px solid #DFE3E6;
    padding-bottom: 12px;
}

.nabestellen-module .nabestel-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.4;
}

.nabestellen-module .nabestel-sum-name {
    color: #2F3F4C;
    font-weight: 600;
}

.nabestellen-module .nabestel-sum-meta {
    display: block;
    font-size: 11px;
    color: #687177;
}

.nabestellen-module .nabestel-sum-price {
    font-weight: 700;
    color: #2F3F4C;
    white-space: nowrap;
}

.nabestellen-module .nabestel-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #2F3F4C;
}

/* Form Styles */
.nabestellen-module .nabestel-form-section {
    font-size: 14px;
    font-weight: 700;
    color: #2F3F4C;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #DFE3E6;
    padding-bottom: 4px;
}

.nabestellen-module .nabestel-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (min-width: 480px) {
    .nabestellen-module .nabestel-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.nabestellen-module .nabestel-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.nabestellen-module .nabestel-form-group label {
    font-size: 11px;
    font-weight: 600;
    color: #687177;
}

.nabestellen-module .nabestel-form-group input,
.nabestellen-module .nabestel-form-group textarea {
    width: 100%;
    height: 38px;
    border: 1px solid #DFE3E6;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 13px;
    color: #1D1F21;
    background-color: #FFFFFF;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nabestellen-module .nabestel-form-group textarea {
    height: 70px;
    padding: 8px 12px;
    resize: none;
}

.nabestellen-module .nabestel-form-group input:focus,
.nabestellen-module .nabestel-form-group textarea:focus {
    border-color: #9BB33B;
    box-shadow: 0 0 0 2px rgba(155, 179, 59, 0.15);
}

.nabestellen-module .nabestel-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0;
}

.nabestellen-module .nabestel-form-checkbox input {
    margin-top: 2px;
    accent-color: #9BB33B;
}

.nabestellen-module .nabestel-form-checkbox label {
    font-size: 12px;
    color: #1D1F21;
    line-height: 1.4;
    cursor: pointer;
}

.nabestellen-module .nabestel-form-disclaimer {
    font-size: 11px;
    color: #687177;
    line-height: 1.4;
    margin: 0 0 16px 0;
}

/* Shipping Fields */
.nabestellen-module .nabestel-shipping-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, opacity 0.35s ease-out;
    opacity: 0;
}

.nabestellen-module .nabestel-shipping-fields.is-visible {
    max-height: 500px;
    opacity: 1;
    margin-top: 12px;
    border-left: 2px solid #9BB33B;
    padding-left: 10px;
}

/* Order Submit Button */
.nabestellen-module .nabestel-submit-btn {
    width: 100%;
    height: 44px;
    background-color: #9BB33B;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.25s ease;
}

.nabestellen-module .nabestel-submit-btn:hover {
    background-color: #7F942D;
}

.nabestellen-module .nabestel-arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.nabestellen-module .nabestel-submit-btn:hover .nabestel-arrow {
    transform: translateX(4px);
}

.nabestellen-module .nabestel-phone-order {
    font-size: 11px;
    color: #687177;
    text-align: center;
    margin: 16px 0 0 0;
}

.nabestellen-module .nabestel-phone-order a {
    color: #2F3F4C;
    font-weight: 600;
    text-decoration: none;
}

.nabestellen-module .nabestel-phone-order a:hover {
    text-decoration: underline;
}
