/* إضافة الأنيميشن على العنصر */
/* تعريف الأنيميشن الذي ينزل بالبطاقة من الأعلى */
@keyframes slideDown {
    0% {
        transform: translateY(-100%) scale(0.8);  /* يبدأ العنصر من الأعلى ويكون أصغر */
        opacity: 0;  /* يبدأ العنصر شفاف */
    }
    100% {
        transform: translateY(0) scale(1);  /* ينزل إلى مكانه الطبيعي ويتكبير */
        opacity: 1;  /* العنصر يصبح غير شفاف */
    }
}




/* Reset بعض الإعدادات الافتراضية */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: rgb(39, 7, 49); /* خلفية داكنة */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

 #goToPage {
        position: absolute;
        top: 10px;
        left: 10px;
        padding: 10px 20px;
        background-color: #BDC3C7;
        color: rgb(39, 7, 49);
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
    }
    #goToPage:hover {
        background-color: #95A5A6;
    }
.container {
    text-align: center;
    background-color: tan;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin-top: 5%;
    margin-bottom: 80px;
    border: 1px solid #E67E22;
    animation: slideDown 1.5s ease-in-out forwards;
}

.business-name {
    margin-bottom: 20px;
    pointer-events: none;
    user-select: none;
}

.business-name img {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 0 auto;
}

.logo img {
    width: 120px;
    height: 120px;
    max-width: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid hsl(302, 26%, 28%);
    user-select: none;
    pointer-events: none;
}

.question-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #34495E;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: 'Tajawal', sans-serif;
}

h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2C3E50;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: bold;
    color: #34495E;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
    transition: color 0.3s ease;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 1rem;
    border: 1px solid #BDC3C7;
    border-radius: 8px;
    background-color: #f7f7f7;
    color: #34495E;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    direction: rtl;
    text-align: right;
    -webkit-appearance: none; /* إزالة التنسيق الافتراضي لأجهزة iOS */
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    border-color: #34495E;
    box-shadow: 0 0 10px #34495E;
    outline: none;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover {
    background-color: #ecf0f1;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* إخفاء الأزرار */
    margin: 0;
}

/* إخفاء الأسهم في Firefox */
input[type="number"] {
    -moz-appearance: textfield; /* إخفاء الأزرار في فايرفوكس */
}

.separator {
    border: none;
    height: 2px;
    background-color: #3d5464;
    margin: 20px 0;
}

.rating {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #BDC3C7;
}

.radio-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
}

.radio-buttons input[type="radio"] {
    display: none;
}

.radio-buttons label {
    position: relative;
    margin: 0 10px;
    padding-left: 30px;
    font-size: 1rem;
    cursor: pointer;
}

.radio-buttons label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #7F8C8D;
    background-color: #fff;
    border-radius: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.radio-buttons input[type="radio"]:checked + label::before {
    content: "✔️";
    text-align: center;
    line-height: 20px;
    border-color: #34495E;
}

button {
    padding: 15px;
    background-color: #BDC3C7;
    color: #34495E;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #95A5A6;
    transform: scale(1.05);
}

.comments textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #BDC3C7;
    border-radius: 8px;
    font-size: 1rem;
    resize: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #34495E;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 60px;
    text-align: right;
}

.comments textarea:focus {
    border-color: #34495E;
    box-shadow: 0 0 10px #34495E;
    outline: none;
}

.comments textarea::placeholder {
    color: #BDC3C7;
    opacity: 1;
}

.comments textarea:focus::placeholder {
    color: #34495E;
}

/* Media Queries for responsiveness */

/* Mobile devices */
/* Media Queries for responsiveness */

/* Mobile devices */
/* Media Queries for responsiveness */

/* Mobile devices (up to 600px) */
@media (max-width: 600px) {
    body {
        padding: 10px; /* Padding for mobile */
    }

    .container {
        padding: 20px;
        margin-top: 10%;
        max-width: 100%; /* Full width */
        margin-bottom: 50px;
    }

    .business-name img {
        width: 150px; /* Adjust size of logo */
    }

    .logo img {
        width: 300px; /* Adjust size of logo */
    }

    .question-title {
        font-size: 1rem; /* Adjust title size */
    }

    h1 {
        font-size: 1.5rem; /* Adjust heading size */
    }

    label {
        font-size: 0.875rem; /* Adjust label font size */
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea {
        font-size: 0.875rem; /* Adjust form field font size */
        -webkit-appearance: none; /* إزالة التنسيق الافتراضي لأجهزة iOS */
        appearance: none;
    }

    button {
        font-size: 1rem; /* Adjust button font size */
        padding: 12px; /* Adjust button padding */
    }

    .comments textarea {
        font-size: 0.875rem; /* Adjust comments textarea font size */
    }

    /* Make radio buttons side by side (in a row) on small devices */
    .radio-buttons {
        display: flex;  /* Use flexbox for alignment */
        flex-direction: row-reverse; /* Arrange the radio buttons horizontally */
        justify-content: space-evenly; /* Space them evenly across the container */
        align-items: center; /* Align the items vertically in the center */
        flex-wrap: wrap; /* Allow wrapping if there is not enough space */
        gap: 10px;
    }

    .radio-buttons label {
        margin: 10px 0; /* إضافة مسافة عمودية بين كل خيار وآخر */ /* Horizontal margin between radio button labels */
        padding-left: 30px; /* Padding to give space for the radio button */
        font-size: 0.875rem; /* Adjust font size for labels */
        display: flex;
        align-items: center; /* Align the radio button and label text */
        
    }

    /* Modify radio buttons to be square instead of circular */
    .radio-buttons label::before {
        content: ''; 
        position: absolute;
        left: 0;
        top: 0;
        width: 20px;
        height: 20px;
        border: 2px solid #7F8C8D;
        background-color: #fff;
        border-radius: 4px; /* Square shape instead of circle */
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    /* Remove fill when the radio button is selected */
    .radio-buttons input[type="radio"]:checked + label::before {
        background-color: #fff; /* Keep it white */
        border-color: #34495E; /* Change the border color */
    }

    /* Label for selected radio button */
    .radio-buttons input[type="radio"]:checked + label {
        color: #34495E; /* Change label color when selected */
    }

    /* Text in the labels */
    .radio-buttons label {
        font-size: 10px; /* Adjust font size */
        text-align: center; /* Center the text */
    }

    input[type="date"]{
        direction: rtl; /* محاذاة المحتوى من اليمين لليسار */
        text-align: right;
        float: right;
        -webkit-appearance: none; /* إزالة التنسيق الافتراضي */
        -moz-appearance: none; /* إزالة التنسيق في Firefox */
        appearance: none; /* إزالة التنسيق الافتراضي في متصفحات أخرى */
        padding: 10px 15px; /* تحسين الحافة لتناسب المحاذاة */
        width: 100%;
        height: 40px; /* تحديد ارتفاع ثابت للحقل */
        box-sizing: border-box;
      
    }

    footer {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        color:  hsl(0, 12%, 79%);
        font-size: 0.9em;
        position: absolute;
        bottom: 0;
        left: 0;
        margin-top: 20px;
    }
    
    footer p {
        margin: 0;
        font-weight: 300;
    }

}


/* Tablets */
@media (min-width: 601px) and (max-width: 1024px) {
    .container {
        padding: 25px;
    }

    .business-name img {
        width: 170px;
    }

    .logo img {
        width: 300px;
    }

    .question-title {
        font-size: 1.125rem;
    }

    h1 {
        font-size: 1.625rem;
    }

    label {
        font-size: 1rem;
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea {
        font-size: 0.9375rem;
    }

    button {
        font-size: 1.0625rem;
        padding: 14px;
    }

    .comments textarea {
        font-size: 1rem;
    }

    footer {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        color:  hsl(0, 12%, 79%);
        font-size: 0.9em;
        position: absolute;
        bottom: 0;
        left: 0;
        margin-top: 20px;
    }
    
    footer p {
        margin: 0;
        font-weight: 300;
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .container {
        padding: 30px;
    }

    .business-name img {
        width: 150px;
    }

    .logo img {
        width: 120px;
    }

    .question-title {
        font-size: 1.375rem;
    }

    h1 {
        font-size: 2rem;
    }

    label {
        font-size: 1.125rem;
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea {
        font-size: 1rem;
    }

    button {
        font-size: 1.125rem;
        padding: 15px;
    }

    .comments textarea {
        font-size: 1rem;
    }

    footer {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        color:  hsl(0, 12%, 79%);
        font-size: 0.9em;
        position: absolute;
        bottom: 0;
        left: 0;
        margin-top: 20px;
    }
    
    footer p {
        margin: 0;
        font-weight: 300;
    }
}
