/* ============================================
   그룹 채팅 전용 스타일
   메인 화면에는 영향을 주지 않음
   ============================================ */

/* 그룹 채팅 전용 오버레이 - 사용 안 함 */
#groupOverlay {
    display: none !important;
}

/* 그룹 채팅 모드일 때만 배경 변경 */
body.group-chat-mode {
    background: #B2C7D9 !important;
    overflow: hidden;
}

/* 그룹 채팅 헤더 */
.group-chat-header {
    background: #FF3B6D;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;  /* 사이드바보다 낮음 */
    height: 56px;
}

.group-chat-header .back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-chat-header .header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.group-chat-header .header-info h1 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.group-participants-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.group-chat-header .header-actions {
    display: flex;
    gap: 12px;
}

.group-chat-header .icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: white;
    cursor: pointer;
    padding: 8px;
}

/* 그룹 채팅 컨테이너 */
.group-chat-container {
    padding: 72px 16px 80px;
    overflow-y: auto;
    height: 100vh;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;  /* 가장 낮은 z-index */
    width: 100%;
    max-width: 100vw;  /* 뷰포트 너비 제한 */
}

/* 그룹 사이드바 - 화면의 80% 너비 (왼쪽 채팅창 20% 보임) */
.group-sidebar {
    position: fixed;
    top: 0;
    right: -80vw;  /* 뷰포트의 80% */
    width: 80vw;   /* 뷰포트의 80% */
    max-width: none;  /* 최대 너비 제한 없음 */
    min-width: 280px;  /* 최소 280px */
    height: 100vh;
    background: white;  /* 완전 불투명 흰색 */
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.group-sidebar.active {
    right: 0;
}

.group-sidebar-header {
    padding: 12px 16px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #E5E5E5;
    height: 56px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.sidebar-back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #191919;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meeting-title-section {
    padding: 12px 20px 20px 20px;
}

.meeting-name {
    font-size: 18px;
    font-weight: 600;
    color: #191919;
}

.group-sidebar-content {
    flex: 1;
    padding: 20px 20px 20px 16px;
}

/* 모임 정보 */
.meeting-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-item i {
    width: 20px;
    color: #FF3B6D;
    font-size: 16px;
}

.info-label {
    font-size: 14px;
    color: #7C7C7C;
    min-width: 50px;
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    color: #191919;
}

.edit-btn {
    width: 100%;
    padding: 12px;
    background: #FF3B6D;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.edit-btn:hover {
    background: #E6325E;
}

.group-sidebar .sidebar-divider {
    height: 1px;
    background: #E5E5E5;
    margin: 0 0 20px 0;
}

/* 초대하기 섹션 */
.invite-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 12px 0;
    margin-bottom: 20px;
}

.invite-label {
    font-size: 16px;
    font-weight: 500;
    color: #191919;
}

.invite-section .share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #E5E5E5;
    background: white;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.invite-section .share-btn:hover {
    background: #F8F9FA;
    border-color: #FF3B6D;
}

.invite-section .share-btn i {
    color: #191919;
}

/* 참여자 섹션 */
.group-sidebar .participants-section {
    margin-bottom: 20px;
}

.group-sidebar .participants-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: #191919;
    margin-bottom: 12px;
    padding-left: 0;
}

.group-sidebar .participants-section .count {
    color: #FF3B6D;
}

.group-sidebar .participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-sidebar .participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 8px 0;
    border-radius: 8px;
    transition: background 0.2s;
}

.group-sidebar .participant-item:hover {
    background: #F8F9FA;
}

.group-sidebar .participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.group-sidebar .participant-avatar.ai-avatar {
    background: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.group-sidebar .participant-avatar.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-sidebar .participant-name {
    font-size: 15px;
    color: #191919;
}

.leave-btn {
    width: 100%;
    padding: 12px;
    background: #F8F9FA;
    color: #7C7C7C;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    transition: all 0.2s;
}

.leave-btn:hover {
    background: #FFE8EE;
    color: #FF3B6D;
    border-color: #FF3B6D;
}

/* 그룹 메시지 스타일 */
.group-message {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.group-message.sent {
    flex-direction: row-reverse;
}

.group-message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.group-message-avatar.ai-avatar {
    background: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.group-message-avatar.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-message-content {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.group-message.sent .group-message-content {
    align-items: flex-end;
}

.group-message-sender {
    font-size: 13px;
    font-weight: 500;
    color: #191919;
    margin-bottom: 2px;
}

.group-message.sent .group-message-sender {
    display: none;
}

.group-message-bubble {
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #191919;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    word-break: break-word;
}

.group-message.sent .group-message-bubble {
    background: #FFE8EE;
}

.group-message-bubble.system {
    background: #E8F5E9;
    border-left: 3px solid #4CAF50;
}

.group-message-time {
    font-size: 11px;
    color: #7C7C7C;
    margin-top: 2px;
}

/* 메시지 버튼 (일정 정하기 등) */
.group-message-buttons {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-cta-button {
    display: inline-block;
    background: #FF3B6D;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(255, 59, 109, 0.2);
}

.group-cta-button:hover {
    background: #E6325E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 59, 109, 0.3);
}

.group-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 59, 109, 0.2);
}

/* 멘션 드롭다운 */
.mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.mention-dropdown.active {
    display: block;
}

.mention-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.mention-item:hover {
    background: #F5F5F5;
}

.mention-item.selected {
    background: #FFE8EE;
}

.mention-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FF3B6D;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.mention-item-avatar.ai-avatar {
    background: transparent;
    padding: 0;
}

.mention-item-avatar.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mention-item-avatar.user-avatar {
    background: linear-gradient(135deg, #FF3B6D 0%, #FF5080 100%);
}

.mention-item-name {
    font-size: 15px;
    font-weight: 500;
    color: #191919;
}

.mention-item-badge {
    margin-left: auto;
    font-size: 11px;
    color: #FF3B6D;
    font-weight: 600;
}

.mention-highlight {
    background: rgba(255, 59, 109, 0.1);
    color: #FF3B6D;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* 모달 공통 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #191919;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #7C7C7C;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #F5F5F5;
}

.modal-body {
    padding: 20px;
}

.modal-description {
    color: #7C7C7C;
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #E5E5E5;
}

.btn-primary {
    width: 100%;
    background: #FF3B6D;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #E6325E;
}

/* 입력 그룹 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #191919;
    font-size: 14px;
}

.location-input {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 12px;
    background: white;
    transition: border-color 0.2s;
}

.location-input:focus-within {
    border-color: #FF3B6D;
}

.location-input i {
    color: #FF3B6D;
    font-size: 16px;
}

.location-input input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #191919;
}

.location-input input::placeholder {
    color: #B0B0B0;
}

/* 위치 검색 래퍼 */
.location-input-wrapper {
    position: relative;
}

/* 위치 검색 결과 */
.location-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.location-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F5F5F5;
    transition: background 0.2s;
}

.location-result-item:last-child {
    border-bottom: none;
}

.location-result-item:hover {
    background: #FFF5F8;
}

.location-name {
    font-size: 14px;
    font-weight: 600;
    color: #191919;
    margin-bottom: 4px;
}

.location-address {
    font-size: 12px;
    color: #7C7C7C;
}

/* 키워드 태그 */
.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #191919;
    user-select: none;
}

.tag:hover {
    border-color: #FF3B6D;
}

.tag.active {
    background: #FF3B6D;
    color: white;
    border-color: #FF3B6D;
}

/* 입력창 */
.group-chat-input-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    border-top: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99;
}

.group-chat-input-wrapper input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
}

.group-chat-input-wrapper input:focus {
    border-color: #FF3B6D;
}

.group-chat-input-wrapper .icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #7C7C7C;
    cursor: pointer;
    padding: 8px;
}

/* 그룹 채팅 날짜 구분선 */
.group-date-divider {
    text-align: center;
    margin: 24px 0;
}

.group-date-divider span {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    display: inline-block;
}

/* =========================
   모달 스타일
   ========================= */

/* 모달 오버레이 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 모달 컨텐츠 */
.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.modal-small {
    max-width: 400px;
}

/* 모달 헤더 */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #191919;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #7C7C7C;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 모달 바디 */
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    color: #7C7C7C;
    font-size: 14px;
    margin-bottom: 16px;
}

/* 모달 푸터 */
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #E5E5E5;
}

.btn-primary {
    width: 100%;
    background: #FF3B6D;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #E6325E;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* =========================
   일정 조율 모달
   ========================= */

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-day {
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 12px;
}

.schedule-day-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: #191919;
    font-size: 14px;
}

.schedule-day-date {
    color: #7C7C7C;
    font-size: 13px;
    font-weight: 400;
}

.schedule-times {
    display: flex;
    gap: 8px;
}

.time-slot {
    flex: 1;
    padding: 10px;
    border: 2px solid #E5E5E5;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    font-weight: 500;
}

.time-slot:hover {
    border-color: #FF3B6D;
}

.time-slot.selected {
    background: #FF3B6D;
    color: white;
    border-color: #FF3B6D;
}

/* 반응형 */
@media (max-width: 768px) {
    .group-sidebar {
        width: 80vw;  /* 모바일에서도 80% */
        right: -80vw;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 85vh;
    }
    
    .schedule-times {
        flex-direction: row;
    }
    
    .time-slot {
        padding: 8px;
        font-size: 12px;
    }
}

/* ============================================
   시스템 알림 (카카오톡 스타일)
   ============================================ */

.system-notification {
    text-align: center;
    margin: 16px 0;
    padding: 0;
    width: 100%;
}

.system-notification-text {
    background: rgba(0, 0, 0, 0.3);  /* 날짜 표시와 동일한 밝기 */
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    display: inline-block;
    max-width: 80%;
    word-break: keep-all;
}

/* ============================================
   지하철역 카드 스타일
   ============================================ */

.station-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.station-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.station-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.station-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.station-rank {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.station-info {
    flex: 1;
}

.station-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.station-line {
    font-size: 13px;
    opacity: 0.9;
}

.station-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.station-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.station-detail i {
    width: 20px;
    color: #667eea;
    font-size: 14px;
}

/* 중간 지점 지하철역 표시 */
.midpoint-stations {
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}

.midpoint-stations h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.midpoint-stations h3 i {
  font-size: 18px;
}

.stations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.station-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.station-rank {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.station-info {
  flex: 1;
}

.station-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.station-distance {
  font-size: 13px;
  opacity: 0.85;
  color: rgba(255, 255, 255, 0.9);
}

/* 참여자 위치 카드 개선 */
.location-list h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.location-item {
  margin-bottom: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.location-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-name i {
  color: #667eea;
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.location-point {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.location-point i {
  width: 16px;
  color: #667eea;
}

.location-point.start i {
  color: #3b82f6;
}

.location-point.end i {
  color: #10b981;
}

.location-prefs {
  margin-top: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.location-prefs i {
  color: #f59e0b;
}

.no-locations {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* ========================================
   장소 투표 UI (체크박스 방식)
   ======================================== */
.voting-container {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
}

.voting-places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.voting-place-item {
  background: white;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: all 0.2s;
}

.voting-place-item:has(input:checked) {
  border-color: #4CAF50;
  background: #f1f8f4;
}

.voting-place-label {
  display: flex;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  gap: 12px;
}

.voting-place-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.voting-place-content {
  flex: 1;
}

.voting-place-name {
  font-weight: 600;
  font-size: 15px;
  color: #333;
  margin-bottom: 4px;
}

.voting-place-address {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
}

.voting-place-address i {
  color: #999;
  font-size: 12px;
}

.voting-submit-btn {
  width: 100%;
  padding: 14px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.voting-submit-btn:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.voting-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.voting-submit-btn i {
  font-size: 18px;
}

/* 투표 현황 보기 버튼 */
.voting-status-btn {
    width: 100%;
    padding: 14px 20px;
    background: white;
    color: #FF5A7E;
    border: 2px solid #FF5A7E;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.voting-status-btn:hover {
    background: #FFF5F7;
    transform: translateY(-1px);
}

.voting-status-btn:active {
    transform: translateY(0);
}

.voting-status-btn i {
    font-size: 18px;
}

/* 영수증 메시지 스타일 */
.receipt-message {
    padding: 0 !important;
    overflow: hidden;
}

.receipt-image-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    max-width: 300px;
}

.receipt-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.receipt-image-container:hover .receipt-thumbnail {
    transform: scale(1.05);
}

.receipt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.receipt-image-container:hover .receipt-overlay {
    opacity: 1;
}

.receipt-overlay i {
    color: white;
    font-size: 32px;
}

.receipt-info {
    padding: 12px;
    background: #f8f9fa;
}

.receipt-store {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.receipt-amount {
    font-size: 16px;
    font-weight: bold;
    color: #FF3B6D;
}

/* 영수증 모달 스타일 */
.receipt-modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #E5E5E5;
}

.receipt-modal-item:last-child {
    border-bottom: none;
}

.receipt-modal-item-name {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.receipt-modal-item-price {
    font-size: 14px;
    color: #666;
    text-align: right;
}

/* ==========================================
   🆕 새로운 정산 시스템 스타일
   ========================================== */

/* 정산 방식 선택 버튼 */
.settlement-choice-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.settlement-choice-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #FF3B6D;
    background: white;
    color: #FF3B6D;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.settlement-choice-btn:hover {
    background: #FF3B6D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 109, 0.3);
}

.settlement-choice-btn i {
    font-size: 24px;
}

/* 정산 요약 정보 */
.settlement-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.settlement-total,
.settlement-participants {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: white;
}

.settlement-total span,
.settlement-participants span {
    font-size: 13px;
    opacity: 0.9;
}

.settlement-total strong,
.settlement-participants strong {
    font-size: 24px;
    font-weight: 700;
}

/* 금액 목록 */
.settlement-amounts {
    margin-bottom: 24px;
}

.settlement-amounts h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.settlement-amount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.settlement-amount-item.my-amount {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE8ED 100%);
    border: 2px solid #FF3B6D;
}

.participant-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.settlement-amount-item .amount {
    font-size: 18px;
    font-weight: 700;
    color: #FF3B6D;
}

/* 확인 섹션 */
.settlement-confirm-section {
    padding: 20px;
    background: #FFF5F7;
    border-radius: 12px;
}

.settlement-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.settlement-info i {
    color: #FF3B6D;
}

/* 개별 항목 선택 */
.settlement-info-box {
    padding: 16px;
    background: #E3F2FD;
    border-radius: 8px;
    margin-bottom: 20px;
}

.settlement-info-box p {
    margin: 0;
    font-size: 14px;
    color: #1976D2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settlement-items-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.settlement-item-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.settlement-item-checkbox:hover {
    border-color: #FF3B6D;
    background: #FFF5F7;
}

.settlement-item-checkbox label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.settlement-item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.item-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.item-price {
    font-size: 14px;
    font-weight: 600;
    color: #FF3B6D;
}

/* 수량 조절 */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E5E5;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: #FF3B6D;
    color: #FF3B6D;
    background: #FFF5F7;
}

.item-quantity input[type="number"] {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.item-quantity input[type="number"]:disabled {
    background: #f8f9fa;
    color: #ccc;
}

/* 총액 표시 */
.settlement-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* 정산 현황 */
.settlement-progress {
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header span {
    font-size: 14px;
    color: #666;
}

.progress-header strong {
    font-size: 16px;
    font-weight: 700;
    color: #FF3B6D;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #E5E5E5;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF3B6D 0%, #FF6B8A 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #E5E5E5;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span {
    font-size: 14px;
    color: #666;
}

.summary-item strong {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* 참여자별 현황 */
.participants-status {
    margin-top: 24px;
}

.participants-status h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.participant-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.participant-status-item.completed {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid #4CAF50;
}

.participant-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-status-item .participant-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.participant-status-item .participant-amount {
    font-size: 13px;
    color: #666;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.completed {
    background: #4CAF50;
    color: white;
}

.status-badge.pending {
    background: #FFC107;
    color: white;
}

/* 버튼 스타일 */
.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #FF3B6D 0%, #FF6B8A 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 109, 0.4);
}

.btn-primary i {
    margin-right: 8px;
}
