/* Montage widget */

.montage-widget {
    margin: 0 0 20px;
    background: #f6f6f6;
    border: 1px solid #eee;
}

/* Cart-change invalidation notice */
.montage-widget .montage-invalidated-notice {
    padding: 10px 20px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    border-bottom: 1px solid #ffc107;
    color: #856404;
    font-size: 0.9em;
}

/* Clickable header / toggle */
.montage-widget .montage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    background: #57b568;
    border-bottom: 1px solid #4aa358;
    transition: background 0.15s;
}

.montage-widget .montage-header:hover {
    background: #4aa358;
}

.montage-widget .montage-header-icon {
    display: inline-block;
    font-size: 20px;
    color: #fff;
    transition: transform 0.2s;
    line-height: 1;
}

.montage-widget .montage-header-icon.open {
    transform: rotate(180deg);
}

.montage-widget .montage-header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.montage-widget .montage-header-title {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.montage-widget .montage-header-badge {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.montage-widget .montage-header-help {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.montage-widget .montage-header-help:hover {
    background: #fff;
    color: #57b568;
}

/* Body (expanded content) */
.montage-widget .montage-body {
    border-top: 1px solid #eee;
}

.montage-widget .table-wrapper {
    overflow-x: auto;
}

.montage-widget table {
    width: 100%;
    border-collapse: separate;
    margin: 0 0 4px;
    background: #fff;
    text-align: center;
}

.montage-widget table th {
    padding: 12px;
    background: #f6f6f6;
    text-transform: uppercase;
    text-align: center;
    font-weight: normal;
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
}

.montage-widget table td {
    padding: 10px;
    border: 1px solid #f6f6f6;
    background: #fff;
    min-width: 50px;
    vertical-align: middle;
}

.montage-widget table td.montage-product {
    text-align: left;
    font-size: 15px;
    color: #666;
}

.montage-widget .montage-item-row td.montage-product {
    background: #f0faf1;
}

.montage-widget .montage-product-num {
    display: inline-block;
    min-width: 20px;
    font-weight: bold;
    color: #57b568;
    margin-right: 4px;
}

.montage-widget table td.montage-rate {
    font-size: 13px;
    color: #aaa;
}

.montage-widget table td.montage-price {
    font-weight: bold;
    font-size: 14px;
    color: #888;
}

.montage-widget table td.montage-subtotal {
    font-weight: bold;
    font-size: 16px;
    color: #57b568;
    white-space: nowrap;
}

.montage-widget table td.montage-subtotal.deselected {
    color: #ccc;
}

/* Checkbox column */
.montage-widget table td.montage-check,
.montage-widget table th.montage-check {
    width: 40px;
    text-align: center;
}

.montage-widget table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
    clip: auto !important;
    position: static !important;
    opacity: 1 !important;
    overflow: visible !important;
}

/* Surcharges section */
.montage-widget .montage-surcharges-header {
    padding: 10px 20px;
    background: #e8f5ea;
    border-top: 2px solid #57b568;
    border-bottom: 1px solid #c8e6c9;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: bold;
    color: #3a8a4a;
    letter-spacing: 0.05em;
}

.montage-widget .montage-surcharge-row td {
    background: #fafafa;
}

/* Total row */
.montage-widget .montage-total-row td {
    background: #f6f6f6;
    border-top: 2px solid #eee;
    padding: 14px 10px;
}

.montage-widget .montage-total-row td.montage-total-label {
    text-align: right;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
}

.montage-widget .montage-total-row td.montage-total-amount {
    font-weight: bold;
    font-size: 18px;
    color: #57b568;
    white-space: nowrap;
    min-width: 100px;
}

/* Add button */
.montage-widget .montage-actions {
    padding: 12px 20px 16px;
    text-align: right;
    border-top: 1px solid #eee;
}

.montage-widget .montage-add-button {
    background: #57b568;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}

.montage-widget .montage-add-button:hover {
    background: #4aa358;
}

.montage-widget .montage-add-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading state */
.montage-widget.montage-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Travel region select */
.montage-widget .montage-travel-select {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
    min-width: 220px;
}

.montage-widget .montage-travel-select.montage-select-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.25);
    outline: none;
}

/* Cart/wishlist row summary */
.montage-config-summary {
    margin: 4px 0 0;
    font-size: 12px;
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.montage-config-summary.montage-summary-expanded {
    max-height: 2000px;
}

.montage-summary-toggle {
    display: inline-block;
    font-size: 11px;
    color: #57b568;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 0;
    text-decoration: underline;
}
