:root {
    --maincolor: #ff8f10;
    /* Ana renk */
    --link: #ff8f10;
    /* Bağlantı rengi */
    --linkhover: #f0a44e;
    /* Bağlantı hover rengi */
}

* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    /* Sayfa yüksekliğini %100 olarak ayarlıyoruz */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #212121;
    color: #cbcbcb;
    display: flex;
    flex-direction: column;
    /* Dikey hizalama için */
    justify-content: center;
    /* Dikeyde ortalamak için */
    align-items: center;
    /* Yatayda ortalamak için */
}

.navbar {
    position: absolute;
    /* Konumu sabitlemek için */
    top: 0;
    /* Ekranın üst kısmında */
    display: flex;
    align-items: center;
    height: 8vh;
    width: 100%;
    background-color: #212121;
    border-bottom: 3px solid var(--maincolor);
}

.logo {
    width: 25%;
    /* Sol kısım */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo img {
    position: absolute;
    left: 0px;
    /* Sol kenardan 0px mesafe */
    max-width: 100%;
    max-height: 100%;
    border-top-right-radius: 15px;
    /* Üst sağ köşe */
    border-bottom-right-radius: 15px;
    /* Alt sağ köşe */
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-block;
    position: relative;
}

.brand-name .letter {
    display: inline-block;
    opacity: 0;
    animation: showLetter 0.5s forwards;
    margin-right: 0.2rem;
}

.brand-name .letter:nth-child(1) {
    animation-delay: 0.1s;
}

.brand-name .letter:nth-child(2) {
    animation-delay: 0.2s;
}

.brand-name .letter:nth-child(3) {
    animation-delay: 0.3s;
}

.brand-name .letter:nth-child(4) {
    animation-delay: 0.4s;
}

.brand-name .letter:nth-child(5) {
    animation-delay: 0.5s;
}

.brand-name .letter:nth-child(6) {
    animation-delay: 0.6s;
}

.brand-name .letter:nth-child(7) {
    animation-delay: 0.7s;
}

@keyframes showLetter {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-name {
    width: 50%;
    /* Ortada ALFVİTA yazısı */
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
}

.translate-btn {
    width: 25%;
    /* Sağ kısım */
    position: relative;
    text-align: center;
    z-index: 10;
}

.flags {
    position: absolute;
    right: 3px;
    /* Sağdan 3px mesafe */
    transform: translateY(-50%);
    /* Vertikal ortalama */
    width: 150px;
}

.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    width: 100px;
    border-radius: 5px;
    cursor: pointer;
    background-color: #2f2f2f;
}

.custom-select .flag-icon-selected {
    margin-right: 10px;
}

.custom-options {
    display: none;
    position: absolute;
    width: 123px;
    border: 1px solid var(--maincolor);
    border-radius: 5px;
    background-color: #212121;
    z-index: 10;
    top: 100%;
    left: 0;
}

.custom-option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: #212121;
    z-index: 10;
}

.custom-option:hover {
    background-color: #2f2f2f;
}

.custom-option .flag-icon {
    margin-right: 10px;
}

.show-options {
    display: block;
}

h1 {
    color: #cbcbcb;
    font-size: 2rem;
    text-align: center;
    transition: opacity 0.3s ease;
}

.mp_button-container {
    margin-top: 20px;
}

.mp_button-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mp_button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: 1px solid var(--maincolor);
    border-radius: 50px;
    background-color: #212121;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mp_button:hover {
    background-color: #2f2f2f;
}

.icon {
    flex-shrink: 0;
}

.mp_button span {
    font-size: 14px;
    color: #b4b4b4;
}

.mp_button:hover span {
    color: #cbcbcb;
}

.message-container {
    width: 100%;
    max-width: 600px;
    padding: 5px;
    position: absolute;
    /* Konumu sabitlemek için */
    bottom: 0;
    /* Ekranın altına yapıştır */
    margin-bottom: 2vh;
    /* Alt boşluk */
}

.message-input {
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: #2f2f2f;
    border: 2px solid var(--maincolor);
    /* Varsayılan renk */
    border-radius: 26px;
    padding: 5px 10px;
    transition: border-color 0.3s ease;
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    padding: 5px 10px;
    font-size: 16px;
    color: #cbcbcb;
}

.input-wrapper textarea::placeholder {
    color: #b4b4b4;
}

.input-wrapper button {
    background-color: #ececec;
    color: #fff;
    border: none;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.3s;
}

.input-wrapper button:disabled {
    background-color: #676767;
    cursor: not-allowed;
}

.input-wrapper button:hover:not(:disabled) {
    background-color: #ececec;
}

.input-wrapper button span {
    font-family: 'Material Icons Round';
    font-size: 24px;
    color: black;
    /* Varsayılan ikon rengi */
    transition: color 0.3s;
}

.input-wrapper button:disabled span {
    color: #2f2f2f;
}

.footer-text {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: #929292;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    font-weight: 600;
}

.chat-section {
    padding-top: 9vh;
    padding-bottom: 80px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    width: 75%;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.message {
    margin: 10px 0;
    display: flex;
    align-items: flex-end;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message.user .text {
    background-color: #3d3d3d;
    color: #e0e0e0;
    border-bottom-right-radius: 0;
}

.message.assistant .text {
    background-color: #2f2f2f;
    color: #fff;
    border-bottom-left-radius: 0;
}

.text {
    max-width: 80%;
    /* Increased width for better readability */
    padding: 14px 20px;
    /* Increased padding */
    border-radius: 15px;
    /* More rounded corners */
    position: relative;
    font-size: 1em;
    line-height: 1.6;
    /* Increased line height */
    word-wrap: break-word;
    /* Handle long words */
}

.text a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-bottom: 2px solid var(--link);
    transition: color var(--transition-speed), border-bottom var(--transition-speed);
}

.text a:hover,
.text a:focus {
    color: var(--linkhover);
    border-bottom: 2px solid var(--linkhover);
    outline: none;
}

.hidden {
    display: none;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid var(--maincolor);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

#loader-text {
    margin-top: 15px;
    color: #fff;
    font-size: 1em;
    text-align: center;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.message.assistant.typing .dot {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #cbcbcb;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.4s infinite both;
}

.message.assistant.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.message.assistant.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

.text a[href^="tel:"] {
    color: var(--link);
    text-decoration: none;
    font-weight: bold;
}

.text a[href^="tel:"]:hover,
.text a[href^="tel:"]:focus {
    color: var(--linkhover);
    text-decoration: underline;
    outline: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chat-section {
        width: 90%;
    }
    #loader-text {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 8vh;
        border-bottom: 1px solid var(--maincolor);
    }
    .brand-name {
        font-size: 1.5rem;
    }
    .brand-name .letter {
        margin-right: 0.1rem;
    }
    .flags {
        width: 60px;
    }
    .custom-select {
        width: 30px;
    }
    #selectedCountry {
        display: none;
    }
    .custom-options {
        width: 130px;
        left: -78px;
    }
    .footer-text {
        font-size: 0.5rem;
        padding: 0.2rem 0;
    }
    .mp_button span {
        font-size: 12px;
    }
    h1 {
        padding: 0 10px;
        font-size: 1.5rem;
    }
    .input-wrapper textarea::placeholder {
        font-size: 12px;
        padding-top: 2px;
    }
    .mp_button {
        padding: 5px 10px;
    }
    .chat-section {
        width: 100%;
    }
    .user {
        margin-left: 10%;
    }
    .assistant {
        margin-right: 10%;
    }
    #loader-text {
        font-size: 0.85em;
    }
}

@media (max-width: 610px) {
    .message-container {
        width: 95%;
    }
}

@media (max-width: 480px) {
    #loader-text {
        font-size: 0.8em;
    }
}

/* ===============================================
   MODAL STYLING
   These styles control the appearance of the 
   consent and info modals.
=============================================== */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 5px;
  width: 90%;
  max-width: 400px;
}

@media (max-width: 600px) {
  .modal-content {
    margin: 30% auto;
    width: 95%;
  }
}
