/* Import Google Fonts at the top of your CSS file */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@700&display=swap');

body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    background-image: url('../images/background4.jpg'); /* Update the path to your image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    direction: rtl;
    margin: 0;
    padding: 0;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #343a40;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

.navbar-brand {
    font-family: 'Amiri', serif; /* Ensure correct font family */
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-collapse {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navbar-nav {
    display: flex;
    justify-content: center;
}

.navbar-nav .nav-link {
    color: #ffffff;
    padding: 10px 15px;
}

.navbar-nav .nav-link:hover {
    color: #ffc107;
}

.navbar-toggler {
    border: 1px solid #ffffff;
    background-color: transparent;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z'/%3E%3C/svg%3E");
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .navbar-brand {
        margin-right: 0;
        font-size: 1.5em;
    }
}

.page-title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    margin: 0 auto;
    padding-top: 60px;
}

.page-title h1 {
    font-family: 'Amiri', serif; /* Ensure correct font family */
    font-size: 2.5em;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
}

/* Search and Dropdown Group Styles */
.group-search, .dropdown-group {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    position: relative; /* Position relative for suggestions container */
}

/* Button Styles */
.btn-custom {
    border-radius: 4px;
    font-size: 0.9em;
    padding: 8px 12px;
    margin: 5px;
}

.search-btn {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.search-btn:hover {
    background-color: #0056b3;
    border-color: #004080;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.copy-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.clear-btn {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.clear-btn:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Hidden, Selected Suggestion and Result Label */
.hidden-text, .selected-suggestion, .selected-suggestion-dropdown {
    margin-top: 15px;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    text-align: right;
    direction: rtl; /* Right-to-left text direction */
    unicode-bidi: embed; /* Ensure proper bidirectional text rendering */
    font-family: 'Amiri', 'Arial', sans-serif; /* Ensure correct font family */
}

/* Button Container Styles */
.button-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.dropdown-group .form-group {
    margin-bottom: 15px;
}

.dropdown-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.dropdown-group select {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px;
    width: 100%;
}

.dropdown-group select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Suggestions Container */
#suggestionsContainer {
    position: absolute;
    top: calc(100% + 5px); /* 5px below the search box */
    left: 0;
    right: 0;
    max-height: 300px; /* Max height with scrolling */
    overflow-y: auto; /* Scroll if content exceeds max height */
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999; /* Ensure it is above other content */
    display: none; /* Initially hidden */
    font-family: 'Amiri', 'Arial', sans-serif; /* Ensure correct font family */
    direction: rtl; /* Right-to-left text direction */
    unicode-bidi: embed; /* Ensure proper bidirectional text rendering */
}

/* Individual Suggestion Item */
.suggestion-item {
    padding: 10px 15px;
    font-size: 1.2em; /* Larger font size for readability */
    border-bottom: 1px solid #ddd; /* Line separating suggestions */
    color: #333;
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s; /* Smooth background color transition */
    direction: rtl; /* Right-to-left text direction */
    unicode-bidi: embed; /* Ensure proper bidirectional text rendering */
}

/* Last Suggestion Item - No Bottom Border */
.suggestion-item:last-child {
    border-bottom: none;
}

/* Hover Effect for Suggestion Items */
.suggestion-item:hover {
    background-color: #f1f1f1; /* Light gray background on hover */
}

/* Font Size Button Styles */
.font-size-btn {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.font-size-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.font-size-btn:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #6c757d;
    cursor: not-allowed;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.font-size-controls .btn {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    margin: 0 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-controls .btn i {
    font-size: 20px;
}

.font-size-controls .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: scale(1.1);
}

.font-size-controls .btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

/* Footer Styles */
.footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.9em;
}

.footer a {
    color: #ffc107;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Nav Tabs Styles */
.nav-tabs .nav-link {
    color: #ffffff;
    background-color: transparent;
    border: 1px solid #343a40;
    border-radius: 0.25rem;
}

.nav-tabs .nav-link.active {
    color: #ffffff;
    background-color: #343a40;
    border-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: #ffc107;
    background-color: #495057;
    border-color: transparent;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.2em;
    }
}
