/**
 * Car Wash Booking - Compact Layout Styles
 * Minimal design for sidebars and tight spaces
 */

/* ========================================
   COMPACT LAYOUT
   ======================================== */

.cwb-booking-compact {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: var(--cwb-bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--cwb-shadow-sm);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cwb-compact-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--cwb-text-primary);
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--cwb-primary-color);
}

/* Form Styles */
.cwb-compact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cwb-form-group {
    display: flex;
    flex-direction: column;
}

.cwb-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cwb-text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cwb-required {
    color: var(--cwb-error-color);
    font-size: 14px;
}

/* Input Styles */
.cwb-select,
.cwb-input,
.cwb-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--cwb-border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--cwb-text-primary);
    background: var(--cwb-bg-primary);
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.cwb-select:focus,
.cwb-input:focus,
.cwb-textarea:focus {
    outline: none;
    border-color: var(--cwb-primary-color);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.cwb-select:disabled,
.cwb-input:disabled,
.cwb-textarea:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
    box-sizing: border-box;
}

.cwb-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.cwb-select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    cursor: not-allowed;
}

/* Ensure option text is visible */
.cwb-select option {
    color: #333;
    background: #fff;
}

/* Package Details */
.cwb-package-details {
    margin-top: 10px;
    padding: 12px;
    background: #f0f6fc;
    border-radius: 6px;
    border: 1px solid #d0e4f7;
}

.cwb-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.cwb-detail-row:not(:last-child) {
    border-bottom: 1px solid #d0e4f7;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.cwb-detail-label {
    font-size: 13px;
    color: var(--cwb-text-secondary);
    font-weight: 500;
}

.cwb-detail-value {
    font-size: 14px;
    color: var(--cwb-text-primary);
    font-weight: 600;
}

.cwb-detail-value.cwb-price {
    color: var(--cwb-primary-color);
    font-size: 16px;
}

/* Help Text */
.cwb-help-text {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: var(--cwb-text-secondary);
    font-style: italic;
}

/* Submit Button */
.cwb-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--cwb-primary-color);
    color: var(--cwb-text-white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cwb-submit-btn:hover:not(:disabled) {
    background: var(--cwb-primary-dark);
    box-shadow: 0 4px 12px var(--cwb-shadow-primary);
    transform: translateY(-1px);
}

.cwb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.cwb-loading {
    text-align: center;
    padding: 20px;
    color: var(--cwb-text-secondary);
    font-size: 14px;
}

/* Add-ons Section */
.cwb-addons-list {
    margin-top: 10px;
}

.cwb-addons-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cwb-addon-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: var(--cwb-bg-primary);
    border: 2px solid var(--cwb-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cwb-addon-item:hover {
    border-color: var(--cwb-primary-color);
    background: #f8fbff;
}

.cwb-addon-item.selected {
    border-color: var(--cwb-primary-color);
    background: #f0f6fc;
}

.cwb-addon-checkbox {
    margin: 2px 10px 0 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.cwb-addon-content {
    flex: 1;
}

.cwb-addon-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--cwb-text-primary);
}

.cwb-addon-description {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: var(--cwb-text-secondary);
    line-height: 1.4;
}

.cwb-addon-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.cwb-addon-price {
    color: var(--cwb-primary-color);
    font-weight: 600;
}

.cwb-addon-duration {
    color: var(--cwb-text-secondary);
}

/* Price Summary */
.cwb-price-summary {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.cwb-price-summary-header {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.cwb-price-summary-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cwb-price-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cwb-price-summary-label {
    font-size: 13px;
    opacity: 0.9;
}

.cwb-total-price,
.cwb-total-duration {
    font-size: 16px;
    font-weight: 700;
}

/* Payment Methods */
.cwb-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cwb-payment-option {
    display: block;
    cursor: pointer;
}

.cwb-payment-radio {
    display: none;
}

.cwb-payment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--cwb-bg-primary);
    border: 2px solid var(--cwb-border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cwb-payment-option:hover .cwb-payment-card {
    border-color: var(--cwb-primary-color);
    background: #f8fbff;
}

.cwb-payment-radio:checked+.cwb-payment-card {
    border-color: var(--cwb-primary-color);
    background: #f0f6fc;
    position: relative;
}

.cwb-payment-radio:checked+.cwb-payment-card::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--cwb-primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cwb-payment-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cwb-payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cwb-payment-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--cwb-text-primary);
}

.cwb-payment-desc {
    font-size: 12px;
    color: var(--cwb-text-secondary);
}

/* Error State */
.cwb-error {
    padding: 12px;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    border-radius: 6px;
    color: var(--cwb-error-color);
    font-size: 13px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .cwb-booking-compact {
        padding: 15px;
        max-width: 100%;
    }

    .cwb-compact-title {
        font-size: 18px;
    }

    .cwb-select,
    .cwb-input {
        padding: 9px 10px;
        font-size: 13px;
    }

    .cwb-submit-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
}

/* Sidebar Widget Styles */
.widget .cwb-booking-compact {
    box-shadow: none;
    border: 1px solid var(--cwb-border-color);
    padding: 15px;
}

.widget .cwb-compact-title {
    font-size: 18px;
}