/**
 * LatePoint Previous Service - Frontend Styles
 * Version 1.3.5
 */

/* Hide radio buttons in summary sidebar - only show in contact step */
.latepoint-summary-w .lp-previous-service-radio,
.latepoint-summary-w .lp-previous-service-display,
.latepoint-summary-w .lp-previous-service-questions-container {
    display: none !important;
}

/* Show only in contact step content */
.step-contact-w .lp-previous-service-radio {
    display: block !important;
}

/* Show display version in confirmation step */
.step-confirmation-w .lp-previous-service-display {
    display: flex !important;
}

/* Container for multiple questions */
.lp-previous-service-questions-container {
    margin: 15px 0;
}

/* Radio buttons styling */
.lp-previous-service-radio {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.lp-previous-service-radio .os-form-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.lp-previous-service-radio .required-star {
    color: #dc3545;
    margin-left: 2px;
}

.lp-previous-service-radio .os-form-radio-group {
    display: flex;
    gap: 20px;
}

.lp-previous-service-radio .os-form-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lp-previous-service-radio .os-form-radio:hover {
    border-color: var(--latepoint-primary-color, #2B86C5);
}

.lp-previous-service-radio .os-form-radio:has(input:checked) {
    border-color: var(--latepoint-primary-color, #2B86C5);
    background: rgba(43, 134, 197, 0.05);
}

.lp-previous-service-radio .os-form-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--latepoint-primary-color, #2B86C5);
}

.lp-previous-service-radio .os-form-radio-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.lp-previous-service-radio .os-form-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
}

.lp-previous-service-radio.has-error {
    border-color: #dc3545;
}

.lp-previous-service-radio.has-error .os-form-error-message {
    display: block !important;
}

/* Hide next button until ALL selections are made - controlled by JS */
.step-contact-w.lp-radio-pending .latepoint-next-btn,
.step-contact-w.lp-radio-pending .latepoint-submit-booking-btn {
    display: none !important;
}

/* Multiple questions spacing */
.lp-previous-service-questions-container .lp-previous-service-radio {
    margin-bottom: 15px;
}

.lp-previous-service-questions-container .lp-previous-service-radio:last-child {
    margin-bottom: 0;
}

.lp-previous-service-questions-container .lp-previous-service-display {
    margin-bottom: 10px;
}

.lp-previous-service-questions-container .lp-previous-service-display:last-child {
    margin-bottom: 0;
}

/* Read-only display for confirmation step */
.lp-previous-service-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.lp-previous-service-display .lp-ps-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.lp-previous-service-display .lp-ps-value {
    font-size: 14px;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 4px;
}

.lp-previous-service-display .lp-ps-value-success {
    background: #d4edda;
    color: #155724;
}

.lp-previous-service-display .lp-ps-value-danger {
    background: #f8d7da;
    color: #721c24;
}
