/* Bubble */
.wpm-bubble {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 60px;
    height: 80px;
    background: #7f54b3;
    color: #fff;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, width 0.2s;
    user-select: none;
}

.wpm-bubble:hover {
    background: #674399;
    width: 64px;
}

.wpm-bubble-icon {
    font-size: 22px;
    line-height: 1;
}

.wpm-bubble-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal overlay */
.wpm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.wpm-modal.active {
    display: flex;
}

.wpm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.wpm-modal-content {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wpm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.wpm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.wpm-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.wpm-close:hover {
    color: #333;
}

.wpm-step {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.wpm-step.active-step {
    display: flex;
}

.wpm-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.wpm-loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* Product items */
.wpm-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.wpm-product-item:last-child {
    border-bottom: none;
}

.wpm-product-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wpm-product-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f0;
}

.wpm-product-info {
    flex: 1;
    min-width: 0;
}

.wpm-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpm-product-price {
    font-size: 13px;
    color: #7f54b3;
    font-weight: 600;
}

.wpm-product-out-of-stock {
    font-size: 11px;
    color: #e53935;
    font-weight: 500;
    text-transform: uppercase;
}

/* Footer */
.wpm-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.wpm-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 6px;
}

.wpm-total-label {
    color: #666;
}

.wpm-grand-total-row {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.wpm-grand-total {
    color: #7f54b3;
}

.wpm-subtotal,
.wpm-discount-amount {
    font-weight: 600;
}

.wpm-discount-amount {
    color: #43a047;
}

.wpm-continuer-btn {
    width: 100%;
    padding: 12px;
    background: #7f54b3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.wpm-continuer-btn:hover:not(:disabled) {
    background: #674399;
}

.wpm-continuer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Step */
.wpm-step-form .wpm-modal-body {
    padding: 16px 20px;
}

.wpm-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wpm-form-row .wpm-form-group {
    flex: 1;
}

.wpm-form-group {
    margin-bottom: 12px;
}

.wpm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.wpm-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wpm-field:focus {
    outline: none;
    border-color: #7f54b3;
    box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.15);
}

.wpm-textarea {
    resize: vertical;
    font-family: inherit;
}

.wpm-form-totals {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f6fc;
    border-radius: 8px;
    border: 1px solid #eee;
}

.wpm-people-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 4px;
    color: #555;
}

.wpm-form-grand-total-row {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #e0d6ef;
}

.wpm-form-grand-total {
    color: #7f54b3;
}

.wpm-enfant-row {
    display: none;
}

.wpm-step-form .wpm-modal-footer {
    display: flex;
    gap: 10px;
}

.wpm-back-btn {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wpm-back-btn:hover {
    background: #e5e5e5;
}

.wpm-submit-btn {
    flex: 1;
    padding: 12px;
    background: #7f54b3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.wpm-submit-btn:hover:not(:disabled) {
    background: #674399;
}

.wpm-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notification */
.wpm-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.wpm-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.wpm-notification.success {
    background: #43a047;
}

.wpm-notification.error {
    background: #e53935;
}

.wpm-notification a {
    color: #fff;
    text-decoration: underline;
    margin-left: 8px;
}
