/* Weinbestellung Frontend Styles */

.wb-order {
    font-family: inherit;
    max-width: 1100px;
    margin: 0 auto;
}

.wb-title { font-size: 1.6em; margin-bottom: 8px; }

.wb-greeting {
    background: #f9f5ee;
    border-left: 4px solid #8b5e2d;
    padding: 10px 16px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.wb-notice {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.wb-error   { background: #fde8e8; border-left: 4px solid #c0392b; color: #7b1a1a; }
.wb-warning { background: #fef9e7; border-left: 4px solid #e67e22; color: #7d4e00; }
.wb-success { background: #eafaf1; border-left: 4px solid #27ae60; color: #1a6b3c; }

/* Category sections */
.wb-category { margin-bottom: 32px; }

.wb-cat-title {
    font-size: 1.15em;
    font-weight: bold;
    color: #6b3a0f;
    border-bottom: 2px solid #8b5e2d;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* Wine table */
.wb-wine-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.wb-wine-table th {
    background: #f2e9df;
    color: #5a3810;
    font-weight: 600;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 2px solid #c49a6c;
    white-space: nowrap;
}

.wb-wine-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #ede0d2;
    vertical-align: middle;
}

.wb-wine-table tr:hover td { background: #fdf6ee; }

.wb-col-num   { width: 40px; color: #999; }
.wb-col-jg    { width: 70px; white-space: nowrap; }
.wb-col-name  { min-width: 160px; }
.wb-col-style { width: 90px; }
.wb-col-desc  { color: #666; font-size: 0.85em; }
.wb-col-price { width: 70px; text-align: right; white-space: nowrap; font-weight: 600; color: #5a3810; }
.wb-col-qty   { width: 68px; }

.wb-desc-text { max-width: 280px; }

.wb-qty-input {
    width: 56px;
    padding: 4px 6px;
    border: 1px solid #c49a6c;
    border-radius: 4px;
    text-align: center;
    font-size: 1em;
    transition: border-color .15s;
}
.wb-qty-input:focus { outline: none; border-color: #8b5e2d; box-shadow: 0 0 0 2px rgba(139,94,45,.2); }
.wb-qty-input[value="0"], .wb-qty-input:not([value]) { color: #bbb; }
.wb-qty-input:not([value="0"]) { color: #333; font-weight: 600; }

/* Sticky bar */
.wb-sticky-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 2px solid #8b5e2d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
    z-index: 100;
    margin-top: 24px;
}

.wb-summary { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95em; }
.wb-summary span { white-space: nowrap; }
.wb-grand { font-size: 1.05em; }

.wb-btn-primary {
    background: #8b5e2d;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.wb-btn-primary:hover { background: #6b3a0f; }
.wb-btn-primary:disabled { background: #bbb; cursor: not-allowed; }

#wb-save-status {
    font-size: 0.9em;
    color: #27ae60;
    min-width: 200px;
}
#wb-save-status.error { color: #c0392b; }

.wb-readonly-total {
    background: #f2e9df;
    padding: 14px 20px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 1.05em;
}

/* Runden-Auswahl */
.wb-round-list { list-style: none; padding: 0; margin: 16px 0; }
.wb-round-item { margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.wb-round-link {
    display: inline-block;
    padding: 10px 20px;
    background: #8b5e2d;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s;
}
.wb-round-link:hover { background: #6b3a0f; color: #fff; }
.wb-round-closed .wb-round-link { background: #999; }
.wb-round-status { font-size: 0.85em; color: #777; }

/* Order summary */
.wb-order-summary {
    margin-top: 32px;
    border-top: 2px solid #c49a6c;
    padding-top: 20px;
}

.wb-order-summary h3 {
    font-size: 1.1em;
    color: #6b3a0f;
    margin-bottom: 12px;
}

.wb-summary-table {
    width: 100%;
    max-width: 520px;
    border-collapse: collapse;
    font-size: 0.9em;
}

.wb-summary-table th {
    background: #f2e9df;
    color: #5a3810;
    font-weight: 600;
    padding: 5px 10px;
    text-align: left;
    border-bottom: 2px solid #c49a6c;
}

.wb-summary-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #ede0d2;
}

.wb-summary-table tfoot td {
    border-bottom: none;
    padding-top: 6px;
}

.wb-summary-table tfoot tr:first-child td {
    border-top: 2px solid #c49a6c;
}

.wb-summary-grand td {
    background: #f9f5ee;
    font-size: 1.05em;
}

.wb-num { text-align: right; white-space: nowrap; }

.wb-summary-empty {
    color: #999;
    font-style: italic;
}

/* Mobile */
@media (max-width: 700px) {
    .wb-col-desc { display: none; }
    .wb-col-style { display: none; }
    .wb-wine-table th, .wb-wine-table td { padding: 4px 5px; font-size: 0.82em; }
    .wb-sticky-bar { gap: 10px; }
    .wb-summary { gap: 10px; font-size: 0.85em; }
}
