/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Yorum Alanı Genel Konteyner */
#comments {
    margin-top: 25px;
    padding: 0;
}

/* Yorum Başlığı */
#reply-title, .comments-title {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--contrast-2);
    margin-bottom: 20px;
    text-align: left; /* Görseldeki gibi sola hizalı */
    padding-bottom: 0;
    border-bottom: none;
    display: block;
    width: auto;
    margin-left: 0;
    margin-right: 0;
}

/* Yorum Formu Arka Planı ve Kenarlıkları */
#commentform {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border: none;

    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Ana flex konteynerindeki boşluk */
    justify-content: space-between;
}

/* Tüm Input ve Textarea Alanları */
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    font-size: 0.95em;
    color: var(--contrast);
    background-color: #fcfcfc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    outline: none;
    box-sizing: border-box;
    width: 100%; /* Kendi parent'larının içinde tam genişlik */
}

/* Yorum metni alanı için özel yükseklik ayarı */
#commentform textarea {
    min-height: 80px;
    max-height: 150px;
    resize: vertical;
}

/* Input ve Textarea Alanları Odaklandığında (Focus) */
#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform input[type="url"]:focus,
#commentform textarea:focus {
    border-color: #7760d9;
    box-shadow: 0 0 0 2px rgba(140, 114, 255, 0.2);
    background-color: #ffffff;
}

/* Placeholder Metin Rengi (tarayıcı uyumluluğu için farklı önekler) */
#commentform ::placeholder {
    color: #aab;
    opacity: 1;
}
#commentform :-ms-input-placeholder {
    color: #aab;
}
#commentform ::-ms-input-placeholder {
    color: #aab;
}

/* Yeni eklenen isim ve e-posta alanlarını saran div */
.comment-form-name-email {
    display: flex;
    flex-wrap: wrap; /* Gerekirse alt satıra geçsin */
    gap: 15px; /* İsim ve e-posta arasındaki boşluk */
    width: 100%; /* Ana form kadar genişlikte olsun */
    order: 2; /* Sıralamayı kontrol ediyoruz */
    margin-bottom: 0; /* Ana formun gap'i ile yönetiliyor */
}

/* Yorum Alanları için Flex Item Ayarları (Inputları saran <p> etiketleri) */
.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-cookies-consent,
.form-submit {
    flex-basis: 100%; /* Varsayılan olarak her eleman tam genişlikte */
    margin-bottom: 0; /* Parent gap'i yönetiyor */
}

/* İsim ve E-posta alanları için özel düzenleme (artık .comment-form-name-email içindeler) */
.comment-form-name-email .comment-form-author,
.comment-form-name-email .comment-form-email {
    flex-basis: calc(50% - 7.5px); /* Yarı genişlik - yarım gap */
    /* Bu p etiketleri artık .comment-form-name-email flex konteynerinin çocukları */
}

.comment-form-comment {
    order: 1; /* Yorum alanı en üstte */
}

/* .comment-form-name-email grubunun kendisi order: 2 olacak (PHP'de ayarladık) */
.comment-form-url {
    order: 3; /* Website alanı, isim ve e-posta grubundan sonra */
}

.comment-form-cookies-consent {
    order: 4; /* Çerez onayı website'dan sonra */
    margin-top: 5px;
}

.form-submit {
    order: 5; /* Gönder butonu en altta */
    margin-top: 15px;
}


/* Kaydetme Onay Kutusu */
#wp-comment-cookies-consent {
    margin-right: 8px;
}
.comment-form-cookies-consent label {
    font-size: 0.85em;
    color: var(--contrast-3);
    cursor: pointer;
}

/* Yorum Gönderme Düğmesi */
#commentform #submit {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #7760d9;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0;
    letter-spacing: 0.3px;
    text-transform: none;
}

#commentform #submit:hover {
    background-color: #7a5bff;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(140, 114, 255, 0.25);
}

#commentform #submit:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Mobil Uyumlu Ayarlamalar */
@media (max-width: 768px) {
    #commentform {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    #reply-title, .comments-title {
        font-size: 1.4em;
        margin-bottom: 15px;
        text-align: center;
    }
    #commentform input[type="text"],
    #commentform input[type="email"],
    #commentform input[type="url"],
    #commentform textarea {
        padding: 12px;
        margin-bottom: 0;
        font-size: 0.95em;
    }
    #commentform textarea {
        min-height: 80px;
    }
    #commentform #submit {
        padding: 12px 18px;
        font-size: 0.95em;
        margin-top: 0;
    }
    /* Mobil'de tüm flex öğeleri tam genişlikte olacak */
    .comment-form-comment,
    .comment-form-url,
    .comment-form-cookies-consent,
    .form-submit {
        flex-basis: 100%;
    }
    /* İsim ve e-posta grubu da mobilde alt alta olsun */
    .comment-form-name-email {
        flex-direction: column;
    }
    .comment-form-name-email .comment-form-author,
    .comment-form-name-email .comment-form-email {
        flex-basis: 100%; /* Mobilde tam genişlik */
    }
}