/* Patient feedback forms (link + QR) — ported from the original feedback.php / qr-feedback.php.
   The original switched alignment with inline PHP; here the same values come from [dir="rtl"]. */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}
[dir="rtl"] { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }

.container { max-width: 500px; margin: 0 auto; }

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
    animation: slideUp 0.5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Language selector */
.language-selector { text-align: right; margin-bottom: 15px; }
[dir="rtl"] .language-selector { text-align: left; }
.language-selector select {
    padding: 8px 12px; border: 2px solid #667eea; border-radius: 20px; background: white;
    color: #667eea; font-size: 14px; font-weight: 600; cursor: pointer; outline: none;
}

.logo { text-align: center; margin-bottom: 20px; }
.logo img { height: 60px; }
.logo.brand-text { margin-bottom: 10px; }
.logo.brand-text h2 { color: #667eea; font-size: 24px; }

.header { text-align: center; margin-bottom: 30px; }
.header h1 { color: #333; font-size: 22px; margin-bottom: 15px; }
.greeting {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; padding: 15px 20px; border-radius: 12px; margin-bottom: 15px;
    font-size: 15px; line-height: 1.5;
}
.greeting strong { display: block; font-size: 17px; margin-bottom: 5px; }
.service-badge {
    display: inline-block; background: #f0f3ff; color: #667eea; padding: 8px 16px;
    border-radius: 20px; font-size: 13px; font-weight: 600; margin-top: 10px;
}

/* QR: customer info */
.customer-info { background: #f8f9fa; padding: 20px; border-radius: 12px; margin-bottom: 25px; }
.customer-info h3 { font-size: 16px; color: #333; margin-bottom: 5px; text-align: left; }
.customer-info p { font-size: 13px; color: #666; margin-bottom: 15px; text-align: left; }
.info-field { margin-bottom: 12px; }
.info-field label { display: block; font-size: 14px; font-weight: 600; color: #333; margin-bottom: 5px; text-align: left; }
.info-field input {
    width: 100%; padding: 12px; border: 2px solid #e1e1e1; border-radius: 8px; font-size: 15px;
    transition: border-color 0.3s; direction: ltr; text-align: left;
}
.info-field input:focus { outline: none; border-color: #667eea; }
.info-hint { font-size: 12px; color: #999; margin-top: 10px; text-align: center; }
[dir="rtl"] .customer-info h3, [dir="rtl"] .customer-info p, [dir="rtl"] .info-field label { text-align: right; }
[dir="rtl"] .info-field input { direction: rtl; text-align: right; }

.warning-msg {
    background: #fff3e0; color: #e65100; padding: 12px 15px; border-radius: 8px;
    font-size: 14px; margin-bottom: 20px; text-align: center;
}

/* Questions */
.question { margin-bottom: 30px; }
.question-text { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 15px; text-align: left; }
[dir="rtl"] .question-text { text-align: right; }

.star-rating { display: flex; justify-content: center; gap: 8px; flex-direction: row-reverse; }
.star-rating input { display: none; }
.star-rating label { font-size: 40px; color: #ddd; cursor: pointer; transition: all 0.2s; }
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: #f5a623; transform: scale(1.1); }

.yesno-buttons { display: flex; gap: 15px; justify-content: center; }
.yesno-btn {
    flex: 1; max-width: 120px; padding: 15px 20px; border: 2px solid #e1e1e1; border-radius: 12px;
    background: white; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s;
    text-align: center;
}
.yesno-btn:hover { border-color: #667eea; }
.yesno-btn.selected { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-color: transparent; }
.yesno-btn input { display: none; }

.text-input {
    width: 100%; padding: 15px; border: 2px solid #e1e1e1; border-radius: 12px; font-size: 16px;
    font-family: inherit; resize: vertical; min-height: 100px; transition: border-color 0.3s;
    direction: ltr; text-align: left;
}
[dir="rtl"] .text-input { direction: rtl; text-align: right; }
.text-input:focus { outline: none; border-color: #667eea; }

.submit-btn {
    width: 100%; padding: 18px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; border-radius: 12px; font-size: 18px; font-weight: 600; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; margin-top: 20px;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.7; cursor: wait; }

/* Result screens */
.success-screen, .error-screen { text-align: center; padding: 40px 20px; }
.success-icon, .error-icon {
    width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; margin: 0 auto 20px;
}
.success-icon { background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%); animation: scaleIn 0.5s ease; }
.error-icon { background: linear-gradient(135deg, #f44336 0%, #e91e63 100%); }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-icon svg, .error-icon svg { width: 40px; height: 40px; color: white; }
.success-screen h2, .error-screen h2 { color: #333; margin-bottom: 10px; }
.success-screen p { color: #666; line-height: 1.6; }
.error-screen p { color: #666; }
