/* Daily BackEnd Page Styles - Chat Interface */

/* Body background */
body {
    background: #F0F3F5;
}

/* Main Content Styles */
.main-content {
    min-height: 100vh;
    padding-top: 168px;
    padding-bottom: 104px;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Chat Container Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 10px;
    width: 600px;
    margin: 0 auto;
}

/* Web Version Styles */
@media (min-width: 768px) {
    .chat-container {
        width: 600px;
        gap: 48px;
    }
}

/* Mobile Version Styles */
@media (max-width: 767px) {
    .main-content {
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .chat-container {
        width: 100%;
        min-width: 320px;
        gap: 24px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Author Message Styles */
.chat-message-author {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.chat-message-author .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
    background: #FFFFFF;
    border-radius: 20px 20px 20px 4px;
    width: fit-content;
    max-width: 100%;
}

.chat-message-author .chat-text {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
}

/* First message special styling */
.chat-message-first {
    padding-top: 48px;
}

/* Author Content Styles */
.chat-content-author {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.chat-content-author .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
    background: #FFFFFF;
    border-radius: 20px 20px 20px 4px;
    width: fit-content;
    max-width: 100%;
}

.chat-content-author .chat-text {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
}

/* Author List Styles */
.chat-list-author {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 4px;
    width: 100%;
}

.chat-list-author .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
    background: #FFFFFF;
    border-radius: 20px 20px 20px 4px;
    width: fit-content;
    max-width: 100%;
}

.chat-list-author .chat-title {
    font-family: 'Inria Serif', serif;
    font-style: normal;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
}

.chat-list-author .chat-text {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
}

/* Reporter Message Styles */
.chat-message-reporter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.chat-message-reporter .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
    background: #333333;
    border-radius: 20px 20px 4px 20px;
    width: fit-content;
    max-width: 100%;
}

.chat-message-reporter .chat-text {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #FFFFFF;
    margin: 0;
}

/* Chat Image Styles */
.chat-image {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.chat-image .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    background: #FFFFFF;
    border-radius: 20px 20px 20px 4px;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
}

.chat-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
    border: none;
    display: block;
}

/* Content + Button Styles */
.chat-content-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.chat-content-button .chat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
    gap: 24px;
    background: #FFFFFF;
    border-radius: 36px 36px 36px 4px;
    width: fit-content;
    max-width: 100%;
    position: relative;
}

.chat-content-button .chat-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 36px;
    padding: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

.chat-content-button .chat-title {
    font-family: 'Inria Serif', serif;
    font-style: normal;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
}

.chat-content-button .chat-buttons-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.chat-content-button .chat-button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    color: #FFFFFF;
    width: auto;
}

.chat-content-button .chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.chat-content-button .chat-text-button {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    padding-left: 8px;
}

.chat-content-button .chat-text-button:hover {
    transform: translateY(-1px);
}

/* Shimmer animation for text button */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.chat-content-button .chat-button.shimmer {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    animation-delay: 5s;
}

/* Mobile Version Adjustments */
@media (max-width: 767px) {
    .main-content {
        padding-top: 32px;
    }
    
    .chat-message-first {
        padding-top: 48px;
    }
    
    .chat-message-author,
    .chat-content-author,
    .chat-list-author {
        align-items: flex-start;
    }
    
    .chat-message-reporter {
        align-items: flex-end;
    }
    
    .chat-container {
        align-items: center;
    }
    
    .chat-message-author,
    .chat-content-author,
    .chat-list-author,
    .chat-message-reporter,
    .chat-image,
    .chat-content-button {
        align-items: center;
    }
    
    .chat-message-author .chat-text,
    .chat-content-author .chat-text,
    .chat-list-author .chat-text,
    .chat-message-reporter .chat-text {
        font-size: 20px;
    }
    
    .chat-content-button .chat-block {
        padding: 16px;
        gap: 16px;
        border-radius: 24px 24px 24px 4px;
    }
    
    .chat-content-button .chat-block::before {
        border-radius: 24px;
    }
    
    .chat-content-button .chat-buttons-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .chat-content-button .chat-button {
        font-size: 14px;
        width: 100%;
    }
    
    .chat-content-button .chat-text-button {
        font-size: 14px;
        text-align: center;
        padding-left: 0;
    }
}

/* Scroll Animation Styles */
.chat-message-author,
.chat-content-author,
.chat-list-author,
.chat-message-reporter,
.chat-image,
.chat-content-button {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.chat-message-author.animate,
.chat-content-author.animate,
.chat-list-author.animate,
.chat-message-reporter.animate,
.chat-image.animate,
.chat-content-button.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.image-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-close:hover {
    opacity: 0.7;
}