﻿@font-face {
    font-family: 'ToyotaType-Book';
    src: url('../Toyota Fonts/ToyotaType-Book.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ToyotaType-Semibold';
    src: url('../Toyota Fonts/ToyotaType-Semibold.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f5f5f5;
    min-height: 100vh;
    font-family: "ToyotaType-Book";
}

.wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background-color: #fff;
}

.form-container {
    width: 90%;
    max-width: 800px;
    background: white;
    padding: 40px;
    border-radius: 8px;
    margin-top: 32px;
}

h2 {
    font-family: "ToyotaType-Semibold";
    text-align: center;
    margin-bottom: 30px;
}

.description-text {
    font-family: "ToyotaType-Book";
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
    margin-bottom: 30px;
    color: rgba(0, 0, 0, 1);
}

.form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.form-group {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 75px;
}

    .form-group label {
        font-family: "ToyotaType-Semibold";
        font-size: 14px;
        color: rgba(0,0,0,1);
        margin-bottom: 0px;
        order: 1;
        flex-shrink: 0;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 5px 0px;
        border: none;
        border-bottom: 1px solid #ccc;
        background: transparent;
        font-family: "ToyotaType-Book";
        font-weight: 400;
        font-size: 16px;
        line-height: 1.2;
        letter-spacing: 0;
        color: rgba(0, 0, 0, 1);
        outline: none;
        order: 2;
        height: 40px;
        box-sizing: border-box;
        flex-shrink: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .form-group select {
        cursor: pointer;
        line-height: 1.2;
    }

        .form-group input:focus,
        .form-group select:focus {
            border-bottom-color: #282830;
        }

    .form-group .validation-message {
        order: 4;
        min-height: 18px;
        margin-top: 3px;
        flex-shrink: 0;
    }

    .form-group small,
    .form-group .form-text {
        order: 3;
        font-family: "ToyotaType-Book";
        font-size: 11px;
        color: #666;
        margin-top: 3px;
        min-height: 14px;
        flex-shrink: 0;
        line-height: 1.2;
    }

        .form-group small.hidden,
        .form-group .form-text.hidden {
            opacity: 0;
            min-height: 14px;
        }

    .form-group .tooltip-container {
        order: 1;
        margin-bottom: 0px;
        flex-shrink: 0;
    }

::placeholder {
    font-family: "ToyotaType-Book";
    color: rgba(179, 179, 179, 1);
    font-size: 14px;
}

select {
    color: rgba(179, 179, 179, 1) !important;
    font-family: "ToyotaType-Book";
    font-size: 14px !important;
}

    select:has(option:checked:not([disabled])) {
        color: rgba(80, 80, 80, 1) !important;
    }

    select option:not([disabled]) {
        color: rgba(80, 80, 80, 1);
    }

button {
    display: block;
    width: 150px;
    margin: 0 auto;
    padding: 10px 20px;
    font-family: "ToyotaType-Semibold";
    font-size: 16px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

    button:hover {
        background: #444;
    }

.hidden {
    display: none;
}

select:invalid {
    color: rgba(80, 80, 80, 1);
    font-size: 13px;
}

.kredi-sonuc-container {
    margin-top: 30px;
}

.kredi-detay-kutu {
    border: 2px solid #4CAF50;
    padding: 20px;
    border-radius: 5px;
    background-color: #ffffff;
}

    .kredi-detay-kutu h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

.kredi-detaylar {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.kredi-item p {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.kredi-item h3 {
    font-size: 22px;
    color: #333;
}

.dosya-notu {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    text-align: right;
}

.validation-message {
    display: block;
    color: rgba(255, 0, 34, 1);
    font-size: 12px;
    font-family: ToyotaType-Book;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    margin-top: 4px;
    order: 4;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-group.has-error input,
.form-group.has-error select {
    border-bottom-color: rgba(255, 0, 34, 1);
}

.form-group.has-error label {
    color: rgba(255, 0, 34, 1);
}

.form-group.has-error .validation-message {
    opacity: 1;
}

.form-group.has-error .validation-message {
    display: block;
}

/* Kredi limit hatası için özel stiller - form validation stiline uygun */
.form-group.kredi-limit-error input,
.form-group.kredi-limit-error select {
    border: none !important;
    border-bottom: 2px solid rgba(255, 0, 34, 1) !important;
    background-color: rgba(255, 0, 34, 0.1) !important;
    outline: none !important;
    box-shadow: none !important;
    animation: shake 0.5s ease-in-out;
    color: rgba(255, 0, 34, 1) !important; /* Input içindeki değerin rengi kırmızı */
}

.form-group.kredi-limit-error label {
    color: rgba(255, 0, 34, 1) !important;
}

.form-group.kredi-limit-error .tooltip-container .info-icon {
    color: rgba(255, 0, 34, 1) !important;
}

.form-group.kredi-limit-error input:focus,
.form-group.kredi-limit-error select:focus {
    border: none !important;
    border-bottom: 2px solid rgba(255, 0, 34, 1) !important;
    background-color: rgba(255, 0, 34, 0.15) !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255, 0, 34, 1) !important; /* Focus durumunda da kırmızı */
}

.form-group.kredi-limit-error input:hover,
.form-group.kredi-limit-error select:hover {
    border: none !important;
    border-bottom: 2px solid rgba(255, 0, 34, 1) !important;
    background-color: rgba(255, 0, 34, 0.12) !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255, 0, 34, 1) !important; /* Hover durumunda da kırmızı */
}

/* Max kredi tutarı yazısı için kırmızı stil */
#maxKrediTutari.kredi-limit-error,
#fiyat-row .kredi-limit-error {
    color: rgba(255, 0, 34, 1) !important;
    font-weight: bold;
}

/* Input kredi limit hatası için */
input.kredi-limit-error {
    color: rgba(255, 0, 34, 1) !important;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.form-row.hidden {
    display: none !important;
}

.form-group[style*="visibility: hidden"] {
    visibility: hidden;
    min-height: 85px;
}

    .form-group[style*="visibility: hidden"] .validation-message {
        min-height: 20px;
    }

    .form-group[style*="visibility: hidden"] small,
    .form-group[style*="visibility: hidden"] .form-text {
        min-height: 16px;
    }

#donanim-fiyat-select-container .form-group {
    width: 100%;
}

#fiyat-row,
#kredi-faiz-row,
#tuzel-fiyat-kredi-row,
#tuzel-faiz-vade-row,
#vade-row-ikinciel,
#varsayilan-faiz-vade-row {
    margin-bottom: 15px;
}

button[type="submit"] {
    margin-top: 25px;
    margin-bottom: 0;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
    order: 2;
}

.dropdown-selected {
    width: 100%;
    padding: 5px 0px;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-family: "ToyotaType-Book";
    font-size: 13px;
    color: rgba(179, 179, 179, 1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    box-sizing: border-box;
    outline: none;
}

    .dropdown-selected:hover,
    .dropdown-selected:focus {
        border-bottom-color: #282830;
    }

    .dropdown-selected.has-selection {
        font-size: 16px;
        color: rgba(0, 0, 0, 1);
    }

        .dropdown-selected.has-selection .selected-text {
            color: rgba(0, 0, 0, 1);
            font-size: 16px;
        }

    .dropdown-selected.selected {
        font-size: 16px;
        color: rgba(0, 0, 0, 1);
    }

.selected-text {
    flex: 1;
    text-align: left;
    font-family: "ToyotaType-Book";
    font-size: inherit;
    color: inherit;
}

.dropdown-arrow {
    font-size: 16px;
    color: #666;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.dropdown-selected.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

    .dropdown-options.open {
        display: block;
    }

.dropdown-header {
    padding: 12px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    font-family: "ToyotaType-Semibold";
    font-weight: 600;
    font-size: 16px;
    color: rgba(0,0,0,1);
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr;
    gap: 10px;
    align-items: center;
    min-height: 45px;
}

    .dropdown-header .header-donanim {
        text-align: left;
    }

    .dropdown-header .header-liste-fiyat {
        text-align: center;
        font-family: "ToyotaType-Book";
        color: rgba(40, 40, 48, 1);
        font-size: 16px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .dropdown-header .header-kampanya-fiyat {
        text-align: center;
        font-family: "ToyotaType-Book";
        color: rgba(40, 40, 48, 1);
        font-size: 16px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

.dropdown-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-family: "ToyotaType-Book";
    font-size: 14px;
    color: rgba(80, 80, 80, 1);
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr;
    gap: 10px;
    align-items: center;
    min-height: 45px;
}

    .dropdown-option:last-child {
        border-bottom: none;
    }

    .dropdown-option:hover {
        background-color: #f5f5f5;
    }

    .dropdown-option .option-donanim {
        font-family: "ToyotaType-Semibold";
        font-weight: 600;
        text-transform: capitalize;
    }

    .dropdown-option .option-liste-fiyat {
        font-family: "ToyotaType-Book";
        color: rgba(40, 40, 48, 1);
        text-align: center;
        font-size: 13px;
        word-wrap: break-word;
    }

    .dropdown-option .option-kampanya-fiyat {
        font-family: "ToyotaType-Book";
        color: rgba(40, 40, 48, 1);
        text-align: center;
        font-weight: 600;
        font-size: 13px;
        word-wrap: break-word;
    }

.simple-dropdown-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-family: "ToyotaType-Book";
    font-size: 13px;
    color: rgba(80, 80, 80, 1);
}

    .simple-dropdown-option:last-child {
        border-bottom: none;
    }

    .simple-dropdown-option:hover {
        background-color: #f5f5f5;
    }

/* Tooltip ve info ikonu için CSS */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.info-icon {
    cursor: pointer;
    color: #000;
    margin-left: 5px;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    background-color: #343a40;
    color: white;
    border-radius: 6px;
    padding: 15px;
    width: 300px;
    left: 0;
    top: 100%;
    margin-top: 10px;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

    .tooltip-content::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 15px;
        border-width: 0 10px 10px 10px;
        border-style: solid;
        border-color: transparent transparent #343a40 transparent;
    }

    .tooltip-content h4 {
        margin: 0 0 8px 0;
        font-size: 14px;
        font-weight: 600;
    }

    .tooltip-content p {
        margin: 0;
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
    }

.tooltip-container:hover .tooltip-content {
    visibility: visible;
}

.vade-row {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    body {
        padding: 20px 0;
        height: auto;
    }

    .form-container {
        width: 95%;
        max-width: none;
        padding: 30px 20px;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

        .form-row .form-group {
            width: 100%;
            margin-bottom: 20px;
            flex: none;
        }

    .form-group[style*="visibility: hidden"] {
        display: none;
    }

    h2 {
        font-size: 20px;
    }

    button {
        width: 100%;
        font-size: 18px;
        padding: 12px;
        margin-top: 25px;
    }

    .kredi-detaylar {
        flex-direction: column;
        gap: 20px;
    }

    .kredi-item h3 {
        font-size: 20px;
    }

    .kredi-item p {
        font-size: 14px;
    }

    .kredi-aciklama {
        font-size: 13px;
    }

    /* Tablet dropdown optimizasyonları */
    .dropdown-header {
        grid-template-columns: 1.8fr 1.3fr 1.3fr;
        gap: 8px;
        padding: 8px 10px;
        font-size: 12px;
        min-height: 40px;
    }

        .dropdown-header .header-liste-fiyat,
        .dropdown-header .header-kampanya-fiyat {
            font-size: 12px;
            line-height: 1.2;
        }

    .dropdown-option {
        grid-template-columns: 1.8fr 1.3fr 1.3fr;
        gap: 8px;
        padding: 8px 10px;
        font-size: 12px;
        min-height: 40px;
    }

        .dropdown-option .option-liste-fiyat,
        .dropdown-option .option-kampanya-fiyat {
            font-size: 10px;
            line-height: 1.2;
        }

    .dropdown-options {
        max-height: 220px;
    }

    /* Tablet için tooltip pozisyonu */
    .tooltip-content {
        width: 90vw;
        max-width: 320px;
        left: 0;
        right: auto;
    }

        .tooltip-content::before {
            left: 20px;
        }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px 15px;
        width: 100%;
    }

    .form-row .form-group {
        margin-bottom: 15px;
    }

    button {
        font-size: 16px;
        padding: 10px;
    }

    /* Mobil dropdown optimizasyonları */
    .dropdown-header {
        grid-template-columns: 1.5fr 1.1fr 1.1fr;
        gap: 6px;
        padding: 6px 8px;
        font-size: 11px;
        min-height: 35px;
    }

        .dropdown-header .header-donanim {
            font-size: 11px;
        }

        .dropdown-header .header-liste-fiyat,
        .dropdown-header .header-kampanya-fiyat {
            font-size: 10px;
            line-height: 1.1;
        }

    .dropdown-option {
        grid-template-columns: 1.5fr 1.1fr 1.1fr;
        gap: 6px;
        padding: 6px 8px;
        font-size: 11px;
        min-height: 35px;
    }

        .dropdown-option .option-donanim {
            font-size: 11px;
            line-height: 1.2;
        }

        .dropdown-option .option-liste-fiyat,
        .dropdown-option .option-kampanya-fiyat {
            font-size: 9px;
            line-height: 1.1;
            word-break: break-word;
        }

    /* Dropdown options genişliğini artır */
    .dropdown-options {
        left: -5px;
        right: -5px;
        max-height: 200px;
    }

    /* Tooltip pozisyonunu düzelt */
    .tooltip-content {
        width: 85vw;
        max-width: 300px;
        font-size: 12px;
        left: 0;
        right: auto;
    }

        .tooltip-content::before {
            left: 20px;
        }

        .tooltip-content h4 {
            font-size: 12px;
        }

        .tooltip-content p {
            font-size: 11px;
        }
}

/* Çok küçük ekranlar için ek optimizasyon */
@media (max-width: 375px) {
    .dropdown-header {
        grid-template-columns: 1.4fr 1.2fr 1.2fr;
        gap: 4px;
        padding: 5px 6px;
        font-size: 10px;
        min-height: 32px;
    }

        .dropdown-header .header-donanim {
            font-size: 10px;
        }

        .dropdown-header .header-liste-fiyat,
        .dropdown-header .header-kampanya-fiyat {
            font-size: 9px;
            line-height: 1.0;
        }

    .dropdown-option {
        grid-template-columns: 1.4fr 1.2fr 1.2fr;
        gap: 4px;
        padding: 5px 6px;
        font-size: 10px;
        min-height: 32px;
    }

        .dropdown-option .option-donanim {
            font-size: 10px;
            line-height: 1.1;
        }

        .dropdown-option .option-liste-fiyat,
        .dropdown-option .option-kampanya-fiyat {
            font-size: 8px;
            line-height: 1.0;
            word-break: break-all;
        }

    /* Dropdown'ı daha da genişlet */
    .dropdown-options {
        left: -8px;
        right: -8px;
        max-height: 180px;
    }

    .form-container {
        padding: 15px 10px;
    }

    /* Çok küçük ekranlar için tooltip */
    .tooltip-content {
        width: 80vw;
        max-width: 280px;
        font-size: 11px;
        left: 0;
        right: auto;
    }

        .tooltip-content::before {
            left: 20px;
        }

        .tooltip-content h4 {
            font-size: 11px;
        }

        .tooltip-content p {
            font-size: 10px;
        }
}
