/* My Chats Page Styles */

.my-chats-section {
    background-color: #f8f9fa;
    min-height: calc(100vh - 300px);
}

.section-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 14px;
    color: #6c757d;
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.search-wrapper input {
    padding-right: 40px;
}

/* Chat Card */
.chat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.chat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.chat-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.astrologer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #f0f0f0;
}

.astrologer-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.astrologer-info p {
    font-size: 13px;
    color: #666;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 453px;
}

.chat-card-body {
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.chat-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.detail-item i {
    margin-right: 8px;
    color: #d9534f;
    font-size: 16px;
}

.detail-item strong {
    color: #333;
    font-weight: 500;
}

.chat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.chat-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.chat-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.chat-status.ongoing {
    background-color: #fff3cd;
    color: #856404;
}

.chat-status.confirmed {
    background-color: #fff3cd;
    color: #856404;
}

.chat-status.cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.view-chat-btn {
    background: #a47515;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-chat-btn:hover {
    background-color: #a47515;
    color: #fff;
}

/* Chat Detail Modal */
.chat-messages-container {
    max-height: 350px;
    overflow-y: auto;
    padding: 20px;
    background-color: #f8f9fa;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chat-message.user-message {
    align-items: flex-end;
}

.chat-message.astrologer-message {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.user-message .message-bubble {
    background-color: #000000;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.astrologer-message .message-bubble {
    background-color: #fff;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.user-message .message-time {
    text-align: right;
}

.astrologer-message .message-time {
    text-align: left;
}

.message-sender {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #666;
}

/* Empty State */
.empty-state {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
}

/* Loading State */
#loadingState .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Chat Info Section */
.chat-info-section {
    background-color: #f8f9fa !important;
}

.chat-info-section small {
    font-size: 11px;
}

.chat-info-section strong {
    font-size: 14px;
    color: #333;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 5px 12px;
}

/* Modal Styling */
.modal-header {
    border-bottom: 1px solid #a47515;
    background-color: #a47515;
}

.modal-footer {
    border-top: 1px solid #a47515;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-card {
        padding: 15px;
    }

    .astrologer-avatar {
        width: 50px;
        height: 50px;
    }

    .astrologer-info h3 {
        font-size: 16px;
    }

    .chat-details {
        gap: 10px;
    }

    .detail-item {
        font-size: 12px;
        width: 100%;
    }

    .chat-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .view-chat-btn {
        width: 100%;
    }

    .message-bubble {
        max-width: 85%;
    }

    .section-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .chat-messages-container {
        max-height: 400px;
    }

    .modal-dialog {
        margin: 10px;
    }
}

/* Scrollbar Styling */
.chat-messages-container::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-card {
    animation: fadeIn 0.3s ease;
}

/* Filter Select Styling */
#filterStatus,
#sortBy {
    cursor: pointer;
    border-color: #ced4da;
}

#filterStatus:focus,
#sortBy:focus,
#searchChats:focus {
    border-color: #d9534f;
    box-shadow: 0 0 0 0.2rem rgba(217, 83, 79, 0.25);
}

/* Download Button */
#downloadChatBtn {
    background-color: #5cb85c;
    border-color: #5cb85c;
}

#downloadChatBtn:hover {
    background-color: #449d44;
    border-color: #449d44;
}

/* No Data Message */
.no-messages {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-messages i {
    font-size: 50px;
    margin-bottom: 15px;
}

.modeclassss {
    background: #84e6fd;
    color: white;
    font-size: 12px;
    border-radius: 9px;
    padding: 1px 8px;
}