/* Message Modal Styles */
.message-modal-content {
    width: 90%;
    max-width: 600px;
    height: 50vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    color: #333;
}

.modal-header {
    background: rgba(0, 0, 0, 0.03);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.message-tabs {
    display: flex;
    gap: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #0072ff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border-radius: 3px 3px 0 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tab-content {
    display: none;
    height: 100%;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Inbox List */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.message-item.unread {
    background: rgba(0, 114, 255, 0.05);
    border-color: rgba(0, 114, 255, 0.2);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.msg-title {
    font-weight: bold;
    color: #1a1a1a;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msg-date {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
}

.msg-badge {
    background: #FF3B30;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.msg-content-preview {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-content-full {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.msg-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.btn-delete-msg {
    background: transparent;
    border: 1px solid rgba(255, 59, 48, 0.5);
    color: #ff3b30;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-msg:hover {
    background: rgba(255, 59, 48, 0.1);
}

/* Feedback Form Styles */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-form .form-group label {
    display: block;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
}

.feedback-form input[type="text"],
.feedback-form textarea {
    width: 100%;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    color: #333;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Crucial for preventing horizontal overflow */
}

.feedback-form input[type="text"]:focus,
.feedback-form textarea:focus {
    border-color: #0072ff;
    box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.1);
    outline: none;
}

.feedback-form textarea {
    resize: none;
    min-height: 100px;
}

/* File Input Styling */
.feedback-form input[type="file"] {
    font-size: 0.85rem;
    color: #666;
}

.image-preview {
    margin-top: 8px;
    position: relative;
    display: inline-block;
    max-width: 120px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f9f9f9;
}

/* Hide image until it has a src */
.image-preview img:not([src]),
.image-preview img[src=""] {
    display: none;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px;
}

#btn-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 10;
}

#btn-remove-image:hover {
    background: #ff7875;
    transform: scale(1.1);
}

/* Styled Submit Button */
#btn-submit-feedback {
    margin-top: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 114, 255, 0.3);
    width: 100%;
}

#btn-submit-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 114, 255, 0.4);
    filter: brightness(1.1);
}

#btn-submit-feedback:active {
    transform: translateY(0);
}

#btn-submit-feedback:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Badge for Floating Button */
.lobby-floating-controls {
    display: flex;
    flex-direction: row;
    /* Horizontal */
    gap: 15px;
    /* Increase gap slightly for horizontal */
    position: absolute;
    bottom: 49px;
    /* Footer (44px) + Gap (5px) */
    right: 32px;
    z-index: 100;
}

.floating-icon-btn {
    position: relative;
    /* Crucial for absolute badge positioning */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 24px;
    color: #4b6cb7;
    /* Theme blue/purple for text icons */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.floating-icon-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: #0072ff;
}

/* Utility */
.hidden {
    display: none !important;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF3B30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    /* Don't interfere with clicks */
}