/**
 * Olimed Quiz - Frontend Styles
 * Beautiful, responsive quiz interface
 */

/* ==================== Base Styles ==================== */
:root {
    --primary-color: #2d7a5f;
    --primary-dark: #2d7a5f;
    --secondary-color: #5ab396;
    --background: #f5f9f7;
    --text-color: #2d5f4f;
    --text-light: #6b8b7f;
    --white: #ffffff;
    --error: #e74c3c;
    --success: #27ae60;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(61, 155, 123, 0.15);
    --transition: all 0.3s ease;
}

[v-cloak] {
    display: none;
}

.olimed-quiz-container {
    max-width: 900px;
    margin: 20px auto;
    direction: rtl;
    color: var(--text-color);
}

/* ==================== Progress Bar ==================== */
.quiz-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e9e6;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background:#2d5f4f;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

/* ==================== Error Message ==================== */
.quiz-error {
    background: #ffe5e5;
    color: var(--error);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-right: 4px solid var(--error);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Step Container ==================== */
.quiz-step {
    background: var(--white);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: var(--box-shadow);
    min-height: 500px;
    position: relative;
    animation: fadeIn 0.5s ease;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><circle cx="100" cy="100" r="150" fill="%23e8f5f0" opacity="0.3"/><circle cx="700" cy="500" r="200" fill="%23d4ebe3" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.step-content {
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== Typography ==================== */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

.main-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.3;
}

.subtitle {
    font-size: 18px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 40px;
}

.step-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 15px;
}

.step-subtitle {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
}

/* ==================== Buttons ==================== */
.btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: inline-block;
    width: 100%;
    max-width: 300px;
}

.btn-primary {
    color: var(--white);
    box-shadow: 0 4px 15px rgba(61, 155, 123, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(61, 155, 123, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
background: var(--white) !important;
	border: 2px solid #21857F;
        color: #2d7a5f !important;
}

.btn-secondary:hover {
background:#2d7a5f !important;
	color: var(--white) !important;
}

/* ==================== Welcome Screen ==================== */
.welcome-screen {
    text-align: center;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

/* ==================== Category Grid ==================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.category-item {
    background: var(--white);
	border: 1px solid #e0e9e6;
	border-radius: 50%;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-item:hover {
border-color: #2d7a5f;
}

.category-item.selected {
    border-color:#2d7a5f;
    background: linear-gradient(135deg, #e8f5f0, #f0f9f5);
    box-shadow: var(--box-shadow);
}

.category-icon {
	    width: 70PX;
	    height: 70PX;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-icon .icon-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* ==================== Symptoms List ==================== */
.symptoms-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.symptom-item {
    background: var(--white);
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.symptom-item:hover {
    border-color: #2d7a5f;
}

.symptom-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-left: 15px;
    cursor: pointer;
    accent-color:#2d7a5f;
}

.symptom-item span {
    font-size: 16px;
    color: var(--text-color);
    flex: 1;
}

.custom-symptom {
    margin-top: 20px;
}

.custom-symptom textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.custom-symptom textarea:focus {
    outline: none;
    border-color:#2d7a5f;
}

.checkboxes {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkboxes label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.checkboxes input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    accent-color:#2d7a5f;
}

/* ==================== Options List ==================== */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    background: var(--white);
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    border-color: #2d7a5f;
    background: #f8fcfb;
}

.option-item input[type="radio"] {
    width: 24px;
    height: 24px;
    margin-left: 15px;
    cursor: pointer;
    accent-color:#2d7a5f;
}

.option-item span {
    font-size: 16px;
    color: var(--text-color);
}

/* ==================== Severity Slider ==================== */
.severity-slider {
    margin: 40px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: #e0e9e6;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:#2d7a5f;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(61, 155, 123, 0.3);
}

.slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:#2d7a5f;
    cursor: pointer;
    border: none;
}

.slider-value {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin: 20px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 10px;
}

/* ==================== More Options ==================== */
.more-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

/* ==================== Age Input ==================== */
.age-input {
    text-align: center;
    margin: 40px 0;
}

.age-input input {
    width: 200px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.age-input input:focus {
    outline: none;
    border-color:#2d7a5f;
    box-shadow: 0 0 0 3px rgba(61, 155, 123, 0.1);
}

/* ==================== Preference Options ==================== */
.preference-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.preference-item {
    background: var(--white);
	border: 1px solid #e0e9e6;
	border-radius: var(--border-radius);
	padding: 20px;
	text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.preference-item:hover {
    border-color:#2d7a5f;
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.preference-item.selected {
    border-color:#2d7a5f;
    background: linear-gradient(135deg, #e8f5f0, #f0f9f5);
}

.preference-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.preference-item > span:first-child:not(:has(+ span)) {
    /* Emoji or placeholder when no image */
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
}

.preference-item span {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* ==================== File Upload ==================== */
.file-upload-area {
    margin: 30px 0;
    text-align: center;
}

.upload-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 3px dashed #2d7a5f;
    border-radius: var(--border-radius);
    background: #f8fcfb;
    cursor: pointer;
    transition: var(--transition);
    min-height: 200px;
}

.upload-button:hover {
    background: #e8f5f0;
    border-color: #2d7a5f;
}

.upload-button svg {
    color: #2d7a5f;
    margin-bottom: 15px;
}

.upload-button span {
    font-size: 16px;
    color: var(--text-color);
}

.uploaded-files {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    background: #f8fcfb;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-file {
    background: var(--error);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* ==================== Form Fields ==================== */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.form-fields input,
.form-fields textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: inherit;
        text-align: right;
}

.form-fields input:focus,
.form-fields textarea:focus {
    outline: none;
    border-color:#2d7a5f;
    box-shadow: 0 0 0 3px rgba(61, 155, 123, 0.1);
}

textarea {
    width: 100%;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-top: 10px;
}

.consent-label input {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.consent-label span {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==================== Contact Methods ==================== */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px 0;
}

.contact-method {
    background: var(--white);
    border: 3px solid #2d7a5f;
    border-radius: var(--border-radius);
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2d7a5f;
    cursor: pointer;
    transition: var(--transition);
}

.contact-method:hover:not(:disabled) {
    background: #2d7a5f;
    color: var(--white);
    transform: translateX(-5px);
}

.contact-method.selected {
    background: #2d7a5f;
    color: var(--white);
}

select {
    height: 4em !important;
}

.contact-method:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== Navigation ==================== */
.step-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.step-navigation .btn {
    max-width: 200px;
}

/* ==================== Loading ==================== */
.loading-spinner {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #2d7a5f;
}

/* ==================== Thank You Screen ==================== */
.thank-you-screen {
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.thank-you-message {
    font-size: 20px;
    color: var(--text-color);
    line-height: 1.8;
    margin-top: 30px;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .olimed-quiz-container {
        margin: 20px auto;
    }
    
    .quiz-step {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .step-title {
        font-size: 22px;
    }
    
    .category-grid {
		        grid-template-columns: repeat(2, 1fr) !important;
gap: 10px;	
	}
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .preference-options {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column-reverse;
    }
    
    .step-navigation .btn {
        max-width: 100%;
    }
    
    .btn {
        padding: 14px 30px;
        font-size: 16px;
        color: #fff;
    }
	
.preference-item {
    display: flex;
    background: var(--white);
    border: 1px solid #e0e9e6;
    border-radius: var(--border-radius);
    padding: 20px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    flex-wrap: nowrap;
}
	
	.preference-grid {
	gap: 12px;
    display: flex;
    flex-direction: column;
}
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.preference-grid{
	display: flex;
    justify-content: center;
    gap: 20px;
}

/* ==================== Medication Details ==================== */
.medication-details {
    margin-right: 30px;
    margin-top: 10px;
    animation: slideDown 0.3s ease;
}

.medication-details textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e9e6;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.medication-details textarea:focus {
    border-color: #2d7a5f;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        margin-top: 10px;
    }
}

.btn-whatsapp {
    color: #434747;
}

.btn-whatsapp:hover {
    color: #2d7a5f;
}