/* ========================================
   CARDS - Home Cards, Calendar Cards
   ======================================== */

/* Simplified Home Card */
.home-card-simple {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 50px;
    background: rgb(35, 35, 55);
    backdrop-filter: none;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
    text-align: center;
}

.home-card-simple h2 {
    color: var(--text-primary);
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-card-simple .subtitle {
    color: var(--text-secondary);
    font-size: 1.2em;
    margin-bottom: 50px;
    font-weight: 400;
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

.button-container .btn {
    width: 100%;
    padding: 20px 40px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.btn-icon {
    font-size: 24px;
}

/* Calendar List Page Styles */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-back:hover {
    transform: translateY(-3px) scale(1.05);
}

.btn-back-header {
    position: absolute;
    left: 20px;
    top: 30px;
    padding: 12px 24px;
    font-size: 14px;
    z-index: 10;
}

.calendar-section {
    margin-bottom: 40px;
}

.section-title {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: left;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.calendar-card-fancy {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: none;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 18px 4px 20px 20px; /* tighter bottom padding */
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden; /* avoid filling the whole column */
    min-height: 120px;
    max-height: clamp(180px, 26vh, 320px); /* responsive cap based on viewport */
    display: flex;
    flex-direction: column;
}

.calendar-card-fancy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    border-radius: 20px;
    overflow: hidden;
}

.calendar-card-fancy:hover::before {
    left: 100%;
}

.calendar-card-fancy:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 6px rgba(0, 0, 0, 0.3);
}

.calendar-card-fancy-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: initial; /* do not expand to fill parent */
    overflow: visible;
}

/* Calendar Title Row - Flexbox layout for title + badge */
.calendar-title-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.calendar-title {
    color: white;
    font-size: 22px;
    margin: 0;
    font-weight: 600;
    flex: 0 1 auto;
    min-width: 0; /* Allow title to shrink if needed */
}

/* Available Dates Badge - Compact pill style */
.available-dates-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.available-dates-badge.dates-found {
    background: rgba(72, 187, 120, 0.15);
    border-color: rgba(72, 187, 120, 0.4);
    color: #48bb78;
}

.available-dates-badge.no-dates-found {
    background: rgba(252, 129, 129, 0.15);
    border-color: rgba(252, 129, 129, 0.4);
    color: #fc8181;
}

.available-dates-badge:hover {
    transform: scale(1.05);
}

.calendar-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
    flex: initial; /* do not stretch */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 17.5px;
}

.meta-item-created {
    font-size: 15.5px;
    opacity: 0.85;
}

.meta-item-created .meta-label {
    color: rgba(255, 255, 255, 0.6);
}

.meta-item-created .meta-value {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.meta-icon {
    font-size: 22.5px;
    width: 30px;
    text-align: center;
}

.meta-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.meta-value {
    color: white;
    font-weight: 600;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
}

.participant-name {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 18.75px;
    padding-left: 8px;
}

.participant-name::before {
    content: '• ';
    color: var(--accent-pink);
}

.participant-more {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 18.75px;
    font-style: italic;
    padding-left: 8px;
}

.calendar-card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-right: 0; /* no extra space needed */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 17.5px;
    font-weight: 500;
}

.action-arrow {
    color: white;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.calendar-card-fancy:hover .action-arrow {
    transform: translateX(5px);
}

/* Calendar Cards - Compact for Grid */
.calendar-scrollable-grid .calendar-card-fancy {
    margin-bottom: 0;
}

.calendar-scrollable-grid .calendar-card-fancy:hover {
    transform: translateX(5px);
    z-index: 10;
}

/* Settings Button on Calendar Cards (Top Right) */
.calendar-card-settings-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.calendar-card-settings-btn:hover {
    background: rgba(102, 126, 234, 0.4);
    transform: scale(1.15) rotate(90deg);
}

/* Delete Button on Calendar Cards (Bottom Right) */
.calendar-card-delete-btn-bottom {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(252, 129, 129, 0.2);
    color: #fc8181;
    border: 2px solid rgba(252, 129, 129, 0.4);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.calendar-card-delete-btn-bottom:hover {
    background: rgba(252, 129, 129, 0.4);
    transform: scale(1.15);
}

/* Legacy Delete Button on Calendar Cards (keeping for backward compatibility) */
.calendar-card-delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(252, 129, 129, 0.2);
    color: #fc8181;
    border: 2px solid rgba(252, 129, 129, 0.4);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.calendar-card-delete-btn:hover {
    background: rgba(252, 129, 129, 0.4);
    transform: scale(1.15);
}

.calendar-card-fancy-content {
    position: relative;
}

/* Responsive Design for Calendar Title Row */
@media (max-width: 600px) {
    .calendar-title-row {
        flex-wrap: nowrap; /* Keep on same line on mobile */
        gap: 8px;
    }

    .calendar-title {
        font-size: 18px; /* Slightly smaller title on mobile */
    }

    .available-dates-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Hidden utility class */
