/* ===========================
   WooCommerce Khảo Sát - Frontend
   =========================== */

.khaosat-wrapper {
 border-top: 1px solid var(--primary-color);
    font-family: inherit;
}

.khaosat-divider {
    border: none;
    
    margin-bottom: 0px;
    opacity: 0.3;
}

.khaosat-title {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.khaosat-category-label {
    font-size: 15px;
    font-weight: 400;
    color: #666;
}

.khaosat-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0 0 25px;
}

/* Form sections */
.khaosat-section {
    background: #f8faff;
    border: 1px solid #d8e4f3;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.khaosat-section-title {
    color: var(--primary-color);;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d8e4f3;
}

/* Grid layout */
.khaosat-row {
    display: flex;
    gap: 15px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.khaosat-col {
    flex: 1;
    min-width: 200px;
}

.khaosat-col-full {
    flex: 0 0 100%;
}

/* Labels */
.khaosat-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.khaosat-required {
    color: #e0172b;
    margin-left: 2px;
}

/* Inputs */
.khaosat-input {
  width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #c5d5e8 !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    color: #333 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s !important;
    -webkit-appearance: none !important;
    min-height: 44px !important;
    box-shadow: unset !important;
}

.khaosat-input:focus {
    outline: none;
    border-color: var(--primary-color);;
    box-shadow: 0 0 0 2px rgba(0, 66, 152, 0.12);
}

.khaosat-input.khaosat-error {
    border-color: #e0172b;
}

.khaosat-textarea {
    resize: vertical;
    min-height: 70px;
}

.khaosat-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Criteria */
.khaosat-criterion {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8eef5;
}

.khaosat-criterion:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.khaosat-criterion-title {
    color: var(--primary-color);;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

/* Radio group */
.khaosat-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.khaosat-radio-label {
display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 23px;
    border: 1px solid #d0dce8;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    background: #fff;
    transition: all 0.18s;
    user-select: none;
    font-weight: normal;
    text-align: center;
}

.khaosat-radio-label:hover {
    border-color: var(--primary-color);;
    background: #f0f6ff;
    color: var(--primary-color);;
}

.khaosat-radio-label input[type="radio"] {
    display: none;
}

.khaosat-radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);;
    background: var(--primary-color);;
    color: #fff;
    font-weight: 600;
}

/* Fallback for browsers without :has() */
.khaosat-radio-label.khaosat-selected {
    border-color: var(--primary-color);;
    background: var(--primary-color);;
    color: #fff;
    font-weight: 600;
}

/* Actions */
.khaosat-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.khaosat-btn-submit {
    padding: 12px 30px;
    background: var(--primary-color);;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.khaosat-btn-submit:hover {
    background: #002d7e;
}

.khaosat-btn-submit:active {
    transform: scale(0.98);
}

.khaosat-btn-submit:disabled {
    background: #99b0d0;
    cursor: not-allowed;
}

.khaosat-btn-reset {
    padding: 10px 20px;
	        margin-right: 0px;
    background: transparent;
    color: #e0172b;
    border: 1px solid #e0172b;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.khaosat-btn-reset:hover {
    background: #fff0f0;
}

/* Message */
.khaosat-message {
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    margin-bottom: 10px;
}

.khaosat-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.khaosat-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success state */
.khaosat-success-overlay {
    text-align: center;
    padding: 40px 20px;
    background: #f0fff4;
    border: 1px solid #84e0a3;
    border-radius: 8px;
    margin-top: 20px;
}

.khaosat-success-overlay .khaosat-check-icon {
    font-size: 56px;
    line-height: 1;
    display: block;
    margin-bottom: 15px;
}

.khaosat-success-overlay h3 {
    color: #155724;
    font-size: 20px;
    margin: 0 0 8px;
}

.khaosat-success-overlay p {
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .khaosat-btn-submit {
        padding: 6px 14px;
        font-size: 13px;

	
	}
    .khaosat-section{
            padding: 10px 10px;
    }
    .khaosat-title{
        display: block;
    }
    .khaosat-row {
        flex-direction: column;
    }
    .khaosat-col {
        min-width: 100%;
    }
    .khaosat-radio-group {
        gap: 6px;
    }
    .khaosat-btn-reset {
      padding: 6px 14px;
        font-size: 13px;
	
	
	}
    .khaosat-radio-label {
              padding: 2px 9px;
        font-size: 13px;
    }
    .khaosat-actions {
		justify-content: center;
    display: flex;

    gap: 0px;}
    .khaosat-title {
        font-size: 20px;
    }
}
