/* General styles for the thread creation page */
.thread-create-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.thread-create-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.thread-create-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thread-create-container label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.thread-create-container select,
.thread-create-container textarea,
.thread-create-container input[type="text"],
.thread-create-container input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
}

.thread-create-container textarea {
    resize: none;
}

.thread-create-container button {
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #dd4153;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.thread-create-container button:hover {
    background-color: #ff334c;
}

.thread-create-container button:focus {
    background-color: #ff334c;
}

/* Optional: Add responsive design */
@media (max-width: 768px) {
    .thread-create-container {
        padding: 15px;
    }

    .thread-create-container h2 {
        font-size: 18px;
    }

    .thread-create-container button {
        font-size: 14px;
    }
}
/* Thread Creation Ends */


/* Thread List starts */
/* Thread List Container */
.thread-list-container {
    max-width: 800px;
    margin: 20px auto 100px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thread-list-container h4 {
    margin-bottom: 15px;
}

/* Threads List */
.thread-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thread-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.thread-item:hover {
    background-color: #f1f1f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thread-item.thread-unread {
    background-color: #fff7e6; /* Highlight for unread threads */
    border-color: #ffcd94;
}

.thread-link {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.thread-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.thread-info p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.thread-timestamp {
    font-size: 12px;
    color: #999;
}

.thread-status .unread-badge {
    background-color: #ff334c;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
}

/* Button Styling */
.thread-btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: #ff334c;
    color: #eeeeee;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.thread-btn:hover {
    color: white;
    background-color: #cc2b3f;
}
/* Thread List ends */


/* Chat Container */
.chat-container {
    max-width: 800px;
    max-height: 760px;
    margin: 20px auto;
    background-color: #f1f1f1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header */
.chat-header {
    background-color: #ff334c;
    color: white;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.chat-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.chat-header p {
    margin: 0;
    font-size: 14px;
    color: #fff;
}

.chat-header a {
    color: #fffdfd !important;
    text-decoration: underline;
}

.chat-header a:hover {
    color: white !important;
    text-decoration: underline;
}

/* Message Area */
.chat-messages {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    max-height: calc(100vh - 200px); /* Dynamically adjust height */
    scroll-behavior: smooth;
}

/* Message Bubble Styling */
.chat-message {
    display: flex;
    margin-bottom: 16px;
}

.chat-message-sent {
    justify-content: flex-end;
}

.chat-message-received {
    justify-content: flex-start;
}

.chat-message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message-bubble p {
    font-size: 14px;
}

.chat-message-sent .chat-message-bubble {
    background-color: #cdc687;
    color: white;
}

.chat-message-sent .chat-message-bubble p {
    color: white;
}

.chat-message-received .chat-message-bubble {
    background-color: #e5e5ea;
    color: #333;
}

.chat-message-received .chat-message-bubble p {
    color: #333;
    line-height: 1.4;
}

/* Timestamp for messages */
.chat-message-time {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: #4a5249;
    text-align: right;
}

/* No Messages Placeholder */
.no-messages {
    text-align: center;
    font-style: italic;
    color: #777;
}

/* Input Area */
.chat-input {
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Input Fields */
.chat-input textarea {
    flex: 1;
    border: 1px solid #ccc;
    background-color: #fff;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input textarea:focus {
    border-color: #ff334c;
    box-shadow: 0 0 4px rgba(255, 51, 76, 0.4);
}

/* Send Button */
.chat-input button {
    background-color: #ff334c;
    color: white;
    border: none;
    margin-top: 5px;
    padding: 12px 30px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-input button:hover {
    background-color: #cc2b3f;
}

.chat-input button:active {
    background-color: #a61e31;
    transform: scale(0.98);
}


.chat-link a {
    color: #ffffff;
    background-color: #ff334c;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.chat-link a:hover {
    background-color: #cc2b3f;
    transform: scale(1.05);
}

.chat-link a:active {
    background-color: #a61e31;
    transform: scale(0.95);
}

.sort-btn {
    text-decoration: none;
    font-size: 0.9rem;
    color: #ff334c;
}

.sort-btn:hover {
    text-decoration: underline;
    color: #cc2a3b;
}

.filter-btn {
    padding: 10px 25px;
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    text-transform: uppercase;
    border: 2px solid #212529;
}

.filter-btn-primary {
    color: #212529;
    background-color: transparent;
    border-color: #212529;
}

.filter-buttons {
    margin-bottom: 20px;
    margin-left: 10px;
    margin-right: 10px;
}
.filter-buttons .filter-btn {
    margin-right: 5px;
    margin-bottom: 10px;
}
.filter-buttons .filter-btn.active {
    background-color: #ff334c;
    color: white;
    border: none;
}

.verification-area {
    margin-top: 50px;
    margin-bottom: 50px;
    font-family: 'Arial', sans-serif;
}

/* Advisory Section Styling */
.advisory-section {
    background: linear-gradient(to right, #fff8e1, #ffe4b5);
    border-left: 5px solid #ffcc00;
    border-radius: 10px;
}

.advisory-section h5 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #ff334c;
}

.advisory-section p {
    font-size: 1rem;
    color: #856404;
    line-height: 1.6;
}

/* Verification Card Styling */
.verification-card {
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.verification-card .card-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff334c;
}

.verification-card .form-control-lg {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    border: 2px solid #ced4da;
    border-radius: 10px;
}

.verification-card .form-control-lg:focus {
    border-color: #ff334c;
    box-shadow: 0 0 10px rgba(255, 51, 76, 0.5);
}

.verification-card .btn-primary {
    background-color: #ff334c;
    border: none;
    padding: 0.75rem;
    font-size: 1.25rem;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.verification-card .btn-primary:hover {
    background-color: #e62a42;
}

/* Text Centering */
.text-muted {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
}

.text-muted a {
    color: #ff334c;
    text-decoration: none;
}

.text-muted a:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 600px) {
    .chat-container {
        max-width: 100%;
        max-height: 100%;
        padding: 10px;
    }

    .chat-header h2 {
        font-size: 16px;
    }

    .chat-header a {
        font-size: 12px;
    }

    .chat-header p {
        font-size: 12px;
    }

    .chat-messages {
        max-height: calc(100vh - 250px);
    }

    .chat-input input {
        margin-bottom: 10px;
    }

    .chat-input button {
        min-width: 35%;
    }
    
    .thread-item {
        padding: 15px 10px;
    }
    
    .thread-info h3 {
        font-size: 14px;
    }

    .thread-info p {
        font-size: 8px;
    }

    .thread-status .unread-badge {
        font-size: 8px;
    }
}
