/**
 * Local Groups Component Styles
 * Solo Haven Local Groups feature styling
 */

/* ==================== CONTAINER & LAYOUT ==================== */

.local-groups-container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.local-groups-header {
    margin-bottom: 24px;
}

.local-groups-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px 0;
}

.local-groups-header .subtitle {
    font-size: 16px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* Back button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background: var(--gray-light, #f8f9fa);
    color: var(--text-primary, #1f2937);
    border-color: var(--primary-purple, #8B7EC8);
}

/* ==================== TABS ==================== */

.local-groups-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--gray-light, #f3f4f6);
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}

.local-groups-tabs .tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.local-groups-tabs .tab:hover {
    color: var(--text-primary, #1f2937);
}

.local-groups-tabs .tab.active {
    background: white;
    color: var(--primary-purple, #8B7EC8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==================== FILTER BAR ==================== */

.groups-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 14px;
    min-width: 180px;
    transition: border-color 0.2s;
}

.filter-group input:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

/* ==================== GROUPS GRID ==================== */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ==================== GROUP CARD ==================== */

.group-card {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-card:hover {
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-purple, #8B7EC8);
}

.group-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.group-card .group-icon {
    font-size: 20px;
}

.group-card .group-location {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.group-card .group-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px 0;
}

.group-card .group-tagline {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.group-card .group-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.group-card .group-stats .stat {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.group-card .group-stats .stat strong {
    color: var(--primary-purple, #8B7EC8);
}

.group-card .view-group-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--primary-purple, #8B7EC8);
    border-radius: 8px;
    color: var(--primary-purple, #8B7EC8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.group-card .view-group-btn:hover {
    background: var(--primary-purple, #8B7EC8);
    color: white;
}

/* Organizer badge on group card */
.group-card .organizer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

/* ==================== GROUP DETAIL ==================== */

.group-detail-container {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.group-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.group-detail-header .group-info {
    flex: 1;
}

.group-detail-header .group-name {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px 0;
}

.group-detail-header .group-location {
    font-size: 16px;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 8px 0;
}

.group-detail-header .group-tagline {
    font-size: 16px;
    color: var(--text-secondary, #6b7280);
    font-style: italic;
    margin: 0;
}

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

/* Stats bar */
.group-stats-bar {
    display: flex;
    gap: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.08), rgba(127, 176, 105, 0.08));
    border-radius: 12px;
    margin-bottom: 24px;
}

.group-stats-bar .stat-item {
    text-align: center;
}

.group-stats-bar .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-purple, #8B7EC8);
}

.group-stats-bar .stat-label {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description section */
.group-description {
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    margin-bottom: 24px;
    line-height: 1.6;
    color: var(--text-primary, #1f2937);
}

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

/* ==================== ORGANIZERS ==================== */

.organizers-section {
    margin-bottom: 32px;
}

.organizers-list {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.organizer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
}

.organizer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.organizer-info {
    display: flex;
    flex-direction: column;
}

.organizer-name {
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.organizer-role {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

/* ==================== MEETINGS LIST ==================== */

.meetings-section {
    margin-bottom: 32px;
}

.meetings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meeting-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-purple, #8B7EC8);
}

.meeting-card .meeting-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    border-radius: 10px;
    text-align: center;
}

.meeting-card .meeting-date .month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meeting-card .meeting-date .day {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.meeting-card .meeting-info {
    flex: 1;
}

.meeting-card .meeting-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 6px 0;
}

.meeting-card .meeting-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.meeting-card .meeting-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--gray-light, #f3f4f6);
    border-radius: 4px;
    font-size: 12px;
}

.meeting-card .meeting-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.meeting-card .attendee-count {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

/* ==================== MEETING DETAIL ==================== */

.meeting-detail-container {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.meeting-detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.meeting-date-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    border-radius: 12px;
    text-align: center;
}

.meeting-date-large .month {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.meeting-date-large .day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.meeting-date-large .year {
    font-size: 12px;
    opacity: 0.9;
}

.meeting-main-info {
    flex: 1;
}

.meeting-main-info .meeting-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--gray-light, #f3f4f6);
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}

.meeting-main-info h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px 0;
}

.meeting-main-info .meeting-time {
    font-size: 15px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* ==================== RSVP SECTION ==================== */

.rsvp-section {
    margin-bottom: 32px;
    padding: 20px;
    background: var(--gray-light, #f8f9fa);
    border-radius: 12px;
}

.rsvp-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary, #1f2937);
}

.rsvp-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rsvp-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rsvp-btn:hover {
    border-color: var(--primary-purple, #8B7EC8);
}

.rsvp-btn.going:hover,
.rsvp-btn.going.active {
    background: var(--primary-green, #7FB069);
    border-color: var(--primary-green, #7FB069);
    color: white;
}

.rsvp-btn.maybe:hover,
.rsvp-btn.maybe.active {
    background: #ffc107;
    border-color: #ffc107;
    color: #1f2937;
}

.rsvp-btn.not-going:hover,
.rsvp-btn.not-going.active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* ==================== VIRTUAL LINK SECTION ==================== */

.virtual-link-section {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.1), rgba(127, 176, 105, 0.1));
    border: 1px solid var(--primary-purple, #8B7EC8);
    border-radius: 10px;
}

.virtual-link-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary, #1f2937);
}

.virtual-link-section .virtual-link {
    color: var(--primary-purple, #8B7EC8);
    font-weight: 500;
    text-decoration: none;
}

.virtual-link-section .virtual-link:hover {
    text-decoration: underline;
}

/* ==================== LOCATION & DESCRIPTION ==================== */

.location-section,
.description-section {
    margin-bottom: 24px;
}

.location-section h3,
.description-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-primary, #1f2937);
}

.location-name {
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    margin: 0 0 4px 0;
}

.location-address {
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.meeting-description {
    line-height: 1.6;
    color: var(--text-primary, #1f2937);
}

/* ==================== ATTENDEES ==================== */

.attendees-section {
    margin-bottom: 32px;
}

.attendees-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary, #1f2937);
}

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

.attendee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}

.attendee-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.attendee-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.attendee-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.attendee-status.going {
    background: rgba(127, 176, 105, 0.15);
    color: var(--primary-green, #7FB069);
}

.attendee-status.maybe {
    background: rgba(255, 193, 7, 0.15);
    color: #b38600;
}

.attendee-status.not-going {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* ==================== ORGANIZER ACTIONS ==================== */

.organizer-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: 32px;
}

/* ==================== MEMBERS SECTION (Organizer) ==================== */

.members-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.members-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.members-table {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.members-table table {
    width: 100%;
    border-collapse: collapse;
}

.members-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--gray-light, #f8f9fa);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.members-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 14px;
}

.invite-section {
    margin-top: 24px;
    padding: 16px;
    background: var(--gray-light, #f8f9fa);
    border-radius: 10px;
}

.invite-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.invite-link-container {
    display: flex;
    gap: 8px;
}

.invite-link-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-light, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-secondary, #6b7280);
}

.btn-outline:hover {
    border-color: var(--primary-purple, #8B7EC8);
    color: var(--primary-purple, #8B7EC8);
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--primary-green, #7FB069);
    color: white;
}

.btn-success:hover {
    background: #6ca058;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* ==================== EMPTY & ERROR STATES ==================== */

.empty-state,
.error-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon,
.error-state .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h4,
.error-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px 0;
}

.empty-state p,
.error-state p {
    color: var(--text-secondary, #6b7280);
    margin: 0 0 20px 0;
}

/* ==================== SKELETON LOADING ==================== */

.skeleton-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.skeleton-group-card {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #e8e8e8 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-btn {
    height: 40px;
    width: 100%;
    margin-top: 12px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

/* ==================== MEETING FORM ==================== */

.meeting-form .form-group {
    margin-bottom: 20px;
}

.meeting-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    margin-bottom: 6px;
}

.meeting-form input,
.meeting-form select,
.meeting-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.meeting-form input:focus,
.meeting-form select:focus,
.meeting-form textarea:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
}

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

.meeting-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.meeting-form .checkbox-label input[type="checkbox"] {
    width: auto;
}

.meeting-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: 20px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .local-groups-container,
    .group-detail-container,
    .meeting-detail-container {
        padding: 16px;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }

    .groups-filter-bar {
        flex-direction: column;
    }

    .filter-group input {
        width: 100%;
        min-width: unset;
    }

    .group-detail-header {
        flex-direction: column;
    }

    .group-stats-bar {
        flex-wrap: wrap;
        gap: 16px;
    }

    .group-stats-bar .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .meeting-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .meeting-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .meeting-card .meeting-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 12px;
    }

    .rsvp-buttons {
        flex-direction: column;
    }

    .rsvp-btn {
        width: 100%;
        justify-content: center;
    }

    .organizer-actions {
        flex-direction: column;
    }

    .organizer-actions .btn {
        width: 100%;
    }

    .meeting-form .form-row {
        grid-template-columns: 1fr;
    }

    .local-groups-tabs {
        width: 100%;
    }

    .local-groups-tabs .tab {
        flex: 1;
        text-align: center;
    }
}
