@charset "utf-8";
body {
    font-family: "Kanit", sans-serif;
    font-weight: 400;            
    line-height: 1.2;
    margin: 10;
    padding: 20px;
    background-color: #f4f4f4;
}
.container {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
nav {
    margin-bottom: 0px;
}
.post {
    background: #f9f9f9;
    border: 2px solid #ddd;
    padding: 45px;
    margin-bottom: 0px;
    border-radius: 25px;
    overflow: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    justify-content: space-between;
}
.post h3 {
    margin-top: 0;
}
.profile-pic-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    float: left;
    margin-right: 10px;
}
select, button {
    padding: 5px;
    margin: 5px 0;	
    font-size: 1.0em;	
}
.aaa1 {text-decoration: overline;}
.text {font-size: 1.2em}
.text2 {
    font-size: 1.2em;
    font-weight: 500;
    justify-content: space-between;
}
.text3 {
    font-size: 1.5em;
    color: #3B5998;
    font-weight: 600;
}
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: white;
    color: #4CAF50;
    text-decoration: none;
    border: 2px solid #4CAF50;
    border-radius: 25px;
    transition: all 0.3s ease;
}
.btn:hover {
    background-color: #4CAF50;
    color: white;
}
.btn-green {
    background-color: #4CAF50;
    color: white;
    border: 2px solid #FFFFFF;
}
.btn-green:hover {
    background-color: white;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}
.btn-blue {
    background-color: #FFFFFF;
    color: #3B5998;
    border: 2px solid #3B5998;
	justify-content: center;
	border-radius: 5px;
}
.btn-blue:hover {
    background-color: #3B5998;
    color: #FFFFFF;
    border: 2px solid #3B5998;
}
.login-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FFFFFF;
    color: #3B5998;
    text-decoration: none;
    border: 2px solid #3B5998;
    border-radius: 25px;
    transition: all 0.3s ease;
}
.login-btn:hover {
   background-color: #3B5998;
    color: #FFFFFF;
}
header {
    background: linear-gradient(180deg, #3B5998, #4CAF50);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    margin-bottom: 0px;	
}
h1, h2 {
    color: #3B5998;
    margin: 0 0 10px 0;
}
header h1, header h2 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
} 	
.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #f0f0f0;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}
nav {
    margin-top: 15px;
}
nav .btn {
    margin-right: 10px;
}       
.user-info p {
    margin: 0;
    font-size: 1.3em;
    color: #3B5998;
}
.menu-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    padding: 15px;
    background: linear-gradient(360deg,#3B5998, #4CAF50 );
    border-radius: 0 0 15px 15px;
    border: 0px solid #3B5998;		
}
.style3 {
    color: #000000;
    font-size: 1.0em;
    font-weight: 500;
}
.trump {
    color: #000000;
    font-size: 1.1em;    
}
.like {
    color: #000000;
    font-size: 0.8em;
    font-weight: 400;
}
footer {
    background: linear-gradient(360deg, #3B5998, #4CAF50);
    color: white;
    padding: 20px;
    border-radius: 0 0 15px 15px;
    margin-top: 20px;
    text-align: center;
    justify-content: space-between;
}
.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(360deg,#3B5998, #4CAF50 );
    border-radius: 0 0 0px 0px;
    border: 0px solid #3B5998;
}
.profile-pic {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    object-fit: cover;
    margin-right: 0px;
    margin-left: 0px;
}
.line-pic {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    object-fit: cover;     
    border: 2px solid #FFFFFF;      
}
.news-ticker {
    background-color: #ffffff;
    border: 0px solid #4CAF50;
    padding: 10px;
    margin-bottom: 0px;
    border-radius: 0px;
}
.content-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.content-wrapper.collapsed {
    max-height: 300px;
}
.content {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 5px;
}
.content br {
    display: none;
}
.read-more-container {
    text-align: right;
    margin-top: 10px;
    height: 20px; /* เพิ่มความสูงตามต้องการ */
}

.read-more-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
}
.read-more-link:hover {
    text-decoration: underline;
}
.fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-image: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}
.pagination {
    text-align: center;
    margin-top: 20px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #4CAF50;
    color: #4CAF50;
    text-decoration: none;
    border-radius: 5px;
}
.pagination .current {
    background-color: #4CAF50;
    color: white;
}
#searchKeyword {
    width: 70%;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
input[type="text"], select {
    border-radius: 0px;
    font-size: 1.25em;
    color:#3B5998;
    font-family: "Kanit", sans-serif;
    font-weight: 500; 
    margin-bottom: 0px;	
}
.text4{
    background: linear-gradient(180deg,#f0f0f0, #f0f0f0 );
    border-radius: 0px 0px 0px 0px;
    border: 0px solid #ffffff;
    text-indent: 20px;		
    padding: 15px;
    margin-top: -16px;		
    font-size: 1.3em;
    color:#3B5998;			
    font-weight: 800; 
}
.text5{
    position: relative; 
    top: 0; 
    left: 0; 
    z-index: 1; 
    background: linear-gradient(180deg,#3B5998, #3B5998 );
    border-radius: 15px 15px 0px 0px;
    border: 0px solid #ffffff;
    text-indent: 20px;		
    padding: 15px;
    margin-top: 0px;
    margin-bottom: -18px;		
    font-size: 1.2em;
    color:#FFFFFF;			
    font-weight: 800; 
}
#searchType {
    margin-bottom: 10px;
}
.search-options {
    display: none;
}	
/* ลบ max-height และ overflow-y ของ .comments-container */
.comments-container {
    /* max-height: 300px; -- ลบบรรทัดนี้ออก */
    /* overflow-y: auto; -- ลบบรรทัดนี้ออก */
    padding-top: 15px; /* เพิ่ม padding-top */
}

/* ปรับ margin และ padding ของ .comment */
.comment {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    /* เพิ่มบรรทัดด้านล่างนี้เพื่อกำหนด margin-top เป็น 0 สำหรับ comment แรก */
    margin-top: 0;
}

/* ตรวจสอบ position ของ elements อื่นๆ ที่อาจทับซ้อน */
.comments-section {
    position: relative; /* เพิ่มบรรทัดนี้ */
    z-index: 1; /* เพิ่มบรรทัดนี้เพื่อให้แน่ใจว่า comments อยู่ด้านบนของ elements อื่น */
}

/* ปรับปรุงสไตล์เพิ่มเติมเพื่อความสวยงามและการอ่านง่าย */
.comment-date {
    font-size: 0.8em;
    color: #777;
    margin-top: 5px;
    display: block;
}

.comment strong {
    color: #3B5998;
}

.comment p {
    margin: 5px 0;
}

/* ปรับปรุง comment form */
.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}
.share-link-input { 
    padding: 0px;
    font-size: 0.5em;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
}
.copy-link-btn {
    width: 45%; 
    padding: 3px 8px;
    font-size: 0.9em;
    background-color: #cccccc;
    color: #333333;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 0 auto;
    border-radius: 5px 5px 5px 5px;
}
.copy-link-btn:hover {
    background-color: #45a049;
    color: #ffffff;
}
/* Add these styles to your index.css file */

.comments-section {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.comments-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header strong {
    margin-right: 5px;
    color: #3B5998;
}

.verified-user {
    color: #4CAF50;
    font-weight: bold;
    margin-right: 5px;
}

.comment-date {
    font-size: 0.8em;
    color: #777;
}

.comment p {
    margin: 0;
    line-height: 1.4;
}
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
}
a[name="media"] {
    display: block;
    position: relative;
    visibility: visible;
    pointer-events: none;
    margin-top: -100px; /* ชดเชยความสูงของ header */
    padding-top: 100px;
}
.emoji-picker {
    display: flex;
    justify-content: center; /* จัดกลางในแนวนอน */
    align-items: center; /* จัดกลางในแนวตั้ง */    
}
.emoji-picker span {
    font-size: 1.2em;
    margin-right: 5px;
    cursor: pointer;
}

.emoji-picker span:hover {
    transform: scale(1.2);
}
/* สำหรับการแสดงผลบนมือถือ */
@media screen and (max-width: 480px) {
    .share-link-container {
        flex-direction: column;
        align-items: stretch;
    }
    .share-link-input, .copy-link-btn {
        width: 100%;
        border-radius: 5px;
        margin-top: 5px;
    }
}
@media screen and (max-width: 768px) {
    .post {
        padding: 30px;
    }
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    .text3 {
        font-size: 1.8em;
    }
    #searchKeyword {
        width: 100%;
        margin-bottom: 10px;
    }
}
@media screen and (max-width: 480px) {
    .post {
        padding: 20px;
    }
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    .text3 {
        font-size: 1.5em;
    }
    .text4, .text5 {
        font-size: 1.2em;
        padding: 15px;
    }
}
.share-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.share-button {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    text-align: center;
    min-width: 120px;
    max-width: 150px;
}
.facebook-share {
    background-color: #3b5998;
}
.facebook-share:hover {
    background-color: #2d4373;
}
.line-share {
    background-color: #00b900;
}
.line-share:hover {
    background-color: #009900;
}
.post-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

/* สำหรับการแสดงผลบนมือถือ */
@media screen and (max-width: 480px) {
    .share-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .share-button {
        margin: 5px 0;
        width: 80%;
        max-width: none;
    }
    .post {
        padding: 20px;
    }
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    .text3 {
        font-size: 1.5em;
    }
    .text4, .text5 {
        font-size: 1.2em;
        padding: 15px;
    }
}
/* สำหรับการแสดงผลบนแท็บเล็ต */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .share-buttons {
        justify-content: center;
    }
    .share-button {
        flex: 0 1 auto;
        min-width: 120px;
        margin: 5px;
    }
}