/* RTL Layout */


.container {
    width: 80%;
    margin: 20px auto;
}

.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    text-align: right;
}

.search-container {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

#search-bar, .search-container input[type="text"] {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    width: 100%;
    max-width: 600px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    text-align: right;
}

#search-bar:focus, .search-container input[type="text"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.results-section {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.results-section h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.search-result {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.search-result:hover {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.02); /* Slight zoom effect */
}


.tree-section {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.tree-section h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.tree-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.connection-search-results {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    width: 100%; /* Make the dropdown width equal to the input field width */
    box-sizing: border-box; /* Ensure padding and borders are included in the width */
}

.connection-search-results div {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.connection-search-results div:hover {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

/* Results Section */
.connection-results-section, .tree-section {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.connection-results-section h2, .tree-section h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Style for the person header section */
.person-header {
    display: flex;
    align-items: flex-start; /* Align name and details vertically */
    gap: 20px; /* Add spacing between the name and details */
    margin-bottom: 20px; /* Add spacing below the header */
}

/* Style for the person's name */
.person-name {
    font-size: 1.8em; /* Larger font size for the name */
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* Style for person details */
.person-details {
    font-size: 1em;
    color: #555;
    line-height: 1.5; /* Improve readability */
}

/* Style for the person info box */
.person-info {
    border: 1px solid rgba(255, 0, 0, 0.4); /* Red border with transparency */
    background-color: rgba(255, 0, 0, 0.1); /* Light red transparent background */
    padding: 10px; /* Add padding inside the box */
    margin-bottom: 20px; /* Add space below the box */
    border-radius: 8px; /* Rounded corners for the box */
    font-size: 1em; /* Standard font size */
    line-height: 1.5; /* Improve readability */
    color: #333; /* Dark text for contrast */
}



/* Make clickable names visually distinct */
.clickable-name {
    cursor: pointer;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.clickable-name:hover {
    font-weight: bold;
    color: #4CAF50;
}

/* Style for each spouse group box */
.spouse-group {
    border: 1px solid rgba(0, 0, 0, 0.2); /* Transparent border */
    background-color: rgba(0, 128, 0, 0.1); /* Light green transparent background */
    padding: 10px;
    margin-bottom: 10px; /* Add space between groups */
    border-radius: 8px; /* Rounded corners for the box */
}

/* Style for clickable spouse names */
.spouse-group strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

/* Style for children list */
.spouse-group ul {
    padding-left: 20px;
    margin: 0;
}

.spouse-group ul li {
    margin-bottom: 5px;
    font-size: 1em;
}


#cy {
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;

    width: 100%;
    height: 600px;
    margin-top: 20px;
    margin-bottom: 80px; /* Add space so the footer doesn’t overlap */
}

/* Style for the hamburger button */
.hamburger-button {
    background: rgb(176, 176, 176);
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    position: relative; /* Needed to align dropdown */
}

/* Style for the dropdown menu */
.dropdown-content {
    display: none;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 5px;
    min-width: 120px;
    z-index: 1000;
    top: 100%; /* Position directly below the button */
    left: 0; /* Align dropdown with button */
}

/* Style for dropdown options */
.dropdown-content a {
    display: block;
    padding: 8px 12px;
    color: black;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Modal Background */
.modal {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Transparent dark overlay */
    justify-content: center;
    align-items: center;
}

/* Modal Content */
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
}

/* Close Button */
.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

/* Textarea for Report */
#report-text {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Submit Button */
#submit-report {
    margin-top: 10px;
    background-color: red;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#submit-report:hover {
    background-color: darkred;
}

/* Modal Background */
/* Ensure modal works on mobile */
.modal {
    display: none;
    position: fixed; /* Ensures it's always on top */
    z-index: 9999; /* Ensures it's above all elements */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Adjusts for small screens */
    max-width: 400px; /* Limits max width */
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Ensure content is centered */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 100%; /* Make sure it fits within modal */
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

/* Fix button alignment */
.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

/* Confirmation Text */
#confirmation-text {
    font-size: 1.2em;
    margin-bottom: 15px;
}


.modal-buttons button {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    border-radius: 5px;
    transition: 0.3s;
}




#confirm-yes {
    background-color: #4CAF50;
    color: white;
}

#confirm-no {
    background-color: #f44336;
    color: white;
}

.modal-buttons button:hover {
    opacity: 0.8;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
