/* Crosspaths Styles - Simple & Clean */

#crosspaths-page .crosspaths-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#crosspaths-page .crosspaths-header {
    text-align: center;
    margin-bottom: 30px;
}

#crosspaths-page .crosspaths-header h2 {
    font-size: 2.5rem;
    color: #1c1e21;
    margin-bottom: 10px;
    font-weight: 700;
}

#crosspaths-page .crosspaths-header p {
    color: #65676b;
    font-size: 1.1rem;
    margin-bottom: 0;
}

#crosspaths-page .crosspaths-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    min-height: 600px;
}

/* Sidebar */
#crosspaths-page .crosspaths-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e4e6ea;
}

#crosspaths-page .crosspaths-nav {
    margin-bottom: 30px;
}

#crosspaths-page .crosspaths-nav .nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #1c1e21;
    margin-bottom: 8px;
    text-align: left;
}

#crosspaths-page .crosspaths-nav .nav-btn:hover {
    background: #f0f8ff;
    color: #1877f2;
}

#crosspaths-page .crosspaths-nav .nav-btn.active {
    background: #1877f2;
    color: white;
}

#crosspaths-page .create-event-btn {
    width: 100%;
    padding: 14px 20px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

#crosspaths-page .create-event-btn:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

#crosspaths-page .example-events h4 {
    margin-bottom: 15px;
    color: #1c1e21;
    font-size: 1.1rem;
    font-weight: 600;
}

#crosspaths-page .example-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    border: 1px solid #e4e6ea;
    background: #f8f9fa;
    color: #1c1e21;
}

#crosspaths-page .example-event:hover {
    background: #f0f8ff;
    border-color: #1877f2;
    color: #1877f2;
}

/* Main Content */
#crosspaths-page .crosspaths-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e4e6ea;
    overflow: hidden;
}

#crosspaths-page .crosspaths-view {
    display: none;
    padding: 20px;
}

#crosspaths-page .crosspaths-view.active {
    display: block;
}

/* Calendar View */
#crosspaths-page .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e4e6ea;
}

#crosspaths-page .calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

#crosspaths-page .calendar-nav .nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e4e6ea;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1e21;
}

#crosspaths-page .calendar-nav .nav-btn:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

#crosspaths-page .calendar-nav h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1c1e21;
    font-weight: 600;
}

#crosspaths-page .calendar-view-toggle {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e4e6ea;
}

#crosspaths-page .view-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #65676b;
    font-weight: 500;
}

#crosspaths-page .view-btn.active {
    background: #1877f2;
    color: white;
}

#crosspaths-page .calendar-grid {
    display: grid;
    gap: 1px;
    background: #e4e6ea;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e4e6ea;
}

#crosspaths-page .calendar-grid.day-view {
    grid-template-columns: 80px 1fr;
    grid-template-rows: repeat(24, 60px);
}

#crosspaths-page .calendar-grid.week-view {
    grid-template-columns: 80px repeat(7, 1fr);
    grid-template-rows: 40px repeat(24, 60px);
}

#crosspaths-page .calendar-grid.month-view {
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 40px repeat(6, 80px);
}

#crosspaths-page .calendar-cell {
    background: white;
    padding: 8px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 1px solid transparent;
}

#crosspaths-page .calendar-cell:hover {
    background: #f0f8ff;
}

#crosspaths-page .calendar-cell.today {
    background: #fff3cd;
    border-color: #ffc107;
}

#crosspaths-page .calendar-cell.other-month {
    color: #adb5bd;
    background: #f8f9fa;
}

#crosspaths-page .calendar-cell.day-header {
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e4e6ea;
}

#crosspaths-page .calendar-cell.time-slot {
    background: #f8f9fa;
    font-size: 0.8rem;
    color: #65676b;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px solid #e4e6ea;
}

#crosspaths-page .calendar-event {
    position: absolute;
    left: 4px;
    right: 4px;
    background: #1877f2;
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    top: 4px;
}

#crosspaths-page .calendar-event:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

#crosspaths-page .calendar-event.private {
    background: #dc3545;
}

#crosspaths-page .calendar-event.private:hover {
    background: #c82333;
}

/* Events List */
#crosspaths-page .events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e4e6ea;
}

#crosspaths-page .events-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1c1e21;
    font-weight: 600;
}

#crosspaths-page .events-filter select {
    padding: 8px 16px;
    border: 1px solid #e4e6ea;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    color: #1c1e21;
}

#crosspaths-page .events-filter select:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

#crosspaths-page .events-list {
    display: grid;
    gap: 20px;
}

#crosspaths-page .event-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e4e6ea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#crosspaths-page .event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1877f2;
}

#crosspaths-page .event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

#crosspaths-page .event-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0;
}

#crosspaths-page .event-card-badges {
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
}

#crosspaths-page .event-card-privacy {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

#crosspaths-page .event-card-privacy.public {
    background: #d4edda;
    color: #155724;
}

#crosspaths-page .event-card-privacy.private {
    background: #f8d7da;
    color: #721c24;
}

#crosspaths-page .event-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

#crosspaths-page .event-status.hosting {
    background: #1877f2;
    color: white;
}

#crosspaths-page .event-status.attending {
    background: #28a745;
    color: white;
}

#crosspaths-page .event-status.invited {
    background: #ffc107;
    color: #1c1e21;
}

#crosspaths-page .event-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#crosspaths-page .event-card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #65676b;
    font-size: 0.9rem;
}

#crosspaths-page .event-card-description {
    color: #1c1e21;
    line-height: 1.5;
    margin-bottom: 15px;
}

#crosspaths-page .event-card-attendees {
    margin-top: 15px;
}

#crosspaths-page .attendees-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#crosspaths-page .attendees-avatars {
    display: flex;
    gap: -8px;
}

#crosspaths-page .attendee-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1877f2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid white;
    margin-left: -8px;
}

#crosspaths-page .attendee-avatar:first-child {
    margin-left: 0;
}

#crosspaths-page .attendees-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#crosspaths-page .attendees-text span {
    font-size: 0.9rem;
    color: #65676b;
}

#crosspaths-page .invited-count {
    font-size: 0.8rem !important;
    color: #ffc107 !important;
    font-weight: 500;
}

/* Invites List */
#crosspaths-page .invites-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e4e6ea;
}

#crosspaths-page .invites-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1c1e21;
    font-weight: 600;
}

#crosspaths-page .invites-list {
    display: grid;
    gap: 15px;
}

#crosspaths-page .invite-card {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#crosspaths-page .invite-info h4 {
    margin: 0 0 8px 0;
    color: #1c1e21;
    font-weight: 600;
}

#crosspaths-page .invite-info p {
    margin: 0;
    color: #65676b;
    font-size: 0.9rem;
}

#crosspaths-page .invite-actions {
    display: flex;
    gap: 10px;
}

#crosspaths-page .accept-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

#crosspaths-page .accept-btn:hover {
    background: #218838;
}

#crosspaths-page .decline-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

#crosspaths-page .decline-btn:hover {
    background: #c82333;
}

/* Modals - Global scope for fixed positioning */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #e4e6ea;
}

.modal-content.event-modal {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e4e6ea;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #1c1e21;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #e4e6ea;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
}

.close-btn:hover {
    background: #dc3545;
    color: white;
}

/* Event Details Modal */
.event-details-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 20px;
}

.event-info {
    padding-right: 20px;
}

.event-meta {
    margin-bottom: 20px;
}

.event-meta > div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #65676b;
}

.event-description {
    margin-bottom: 30px;
}

.event-description p {
    line-height: 1.6;
    color: #1c1e21;
}

.event-attendees h4 {
    margin-bottom: 15px;
    color: #1c1e21;
    font-weight: 600;
}

.attendees-list {
    display: grid;
    gap: 10px;
}

.attendee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e4e6ea;
}

.attendee-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.attendee-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1877f2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Event Chat */
.event-chat {
    border-left: 1px solid #e4e6ea;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #e4e6ea;
    margin-bottom: 15px;
}

.chat-header h4 {
    margin: 0;
    color: #1c1e21;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    margin-bottom: 15px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e4e6ea;
}

.chat-message.own {
    background: #1877f2;
    color: white;
    margin-left: 20px;
    border-color: #1877f2;
}

.chat-message-author {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.chat-message-text {
    line-height: 1.4;
}

.chat-message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e4e6ea;
    border-radius: 6px;
    outline: none;
}

.chat-input input:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.send-btn {
    padding: 10px 15px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #166fe5;
}

.event-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e4e6ea;
    background: #f8f9fa;
}

.event-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.primary-btn {
    background: #1877f2;
    color: white;
}

.primary-btn:hover {
    background: #166fe5;
}

.secondary-btn {
    background: #65676b;
    color: white;
}

.secondary-btn:hover {
    background: #5a6268;
}

.delete-btn {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1c1e21;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e4e6ea;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e4e6ea;
    margin-top: 20px;
}

/* Invite Suggestions */
.invite-suggestions {
    position: relative;
    background: white;
    border: 1px solid #e4e6ea;
    border-radius: 6px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.invite-suggestions.active {
    display: block;
}

.invite-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-suggestion:hover {
    background: #f8f9fa;
}

.invite-suggestion:last-child {
    border-bottom: none;
}

.invited-users {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invited-user {
    background: #1877f2;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invited-user-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invited-user-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* No content messages */
.no-events,
.no-invites,
.no-attendees {
    text-align: center;
    color: #65676b;
    font-style: italic;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #crosspaths-page .crosspaths-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #crosspaths-page .crosspaths-sidebar {
        order: 2;
    }
    
    #crosspaths-page .crosspaths-main {
        order: 1;
    }
    
    #crosspaths-page .calendar-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .event-details-content {
        grid-template-columns: 1fr;
    }
    
    .event-chat {
        border-left: none;
        border-top: 1px solid #e4e6ea;
        padding-left: 0;
        padding-top: 20px;
        margin-top: 20px;
    }
    
    #crosspaths-page .calendar-grid.day-view,
    #crosspaths-page .calendar-grid.week-view {
        grid-template-columns: 60px 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    #crosspaths-page .event-card-meta {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    #crosspaths-page .crosspaths-container {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    #crosspaths-page .crosspaths-header h2 {
        font-size: 2rem;
    }
    
    #crosspaths-page .calendar-view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    #crosspaths-page .view-btn {
        flex: 1;
    }
}
