/* ============================================
   Members Area V2 - Modern Redesign
   Mobile-first approach
   ============================================ */

/* CSS Variables for easy customization */
:root {
    --primary-green: #4CAF50;
    --primary-orange: #FF9800;
    --primary-blue: #2196F3;
    --status-open: #4CAF50;
    --status-paused: #FFC107;
    --status-closed: #9E9E9E;
    --text-dark: #212121;
    --text-medium: #757575;
    --text-light: #BDBDBD;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* ============================================
   Active Castings Cards
   ============================================ */

.members-area-v2 {
    padding: 0;
    background-color: #ffffff;
}

.castings-header {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding: 0 16px;
}

.casting-card {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Unpaid casting card design */
.casting-card-unpaid {
    border: 1px solid #e5e7eb;
}

.casting-card-unpaid-header {
    padding: 20px;
}

.casting-card-unpaid-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.casting-card-unpaid-stats {
    margin-bottom: 16px;
}

.casting-card-unpaid-applicants {
    font-size: 15px;
    color: var(--text-medium);
}

.casting-card-unpaid-applicants .applicants-number {
    color: #ff6b35;
    font-weight: bold;
}

.casting-card-unpaid-banner {
    background-color: #fff3e0;
    color: #e65100;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.casting-card-unpaid-banner .banner-icon {
    font-size: 18px;
}

.casting-card-unpaid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.casting-card-unpaid-date {
    font-size: 13px;
    color: var(--text-medium);
}

.casting-complete-payment-btn {
    background-color: transparent;
    color: #ff6b35;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.casting-complete-payment-btn:hover {
    background-color: #fff3e0;
}

.casting-complete-payment-btn span {
    font-size: 16px;
}

.casting-manage-btn {
    background-color: #e8f5e9;
    color: #4CAF50;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.casting-manage-btn:hover {
    background-color: #c8e6c9;
}

.casting-card:active {
    transform: scale(0.98);
}

.casting-card-header {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.casting-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.casting-price-tag-on-image {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}

.casting-status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.casting-header-text-bottom {
    margin-top: auto;
}

.casting-status-badge.open {
    background-color: var(--status-open);
    color: white;
}

.casting-status-badge.paused {
    background-color: var(--status-paused);
    color: var(--text-dark);
}

.casting-status-badge.payment-required {
    background-color: #ff6b35;
    color: white;
}

.casting-header-text-bottom {
    margin-top: auto;
}

.casting-title {
    color: white;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.casting-location {
    color: white;
    font-size: 15px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.casting-location::before {
    content: "📍";
    font-size: 12px;
}

.casting-card-body {
    padding: 16px;
}

.casting-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.casting-detail-item {
    flex: 1;
}

.casting-detail-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-medium);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.casting-detail-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
}

.casting-detail-value.reward {
    color: var(--primary-blue);
}

.casting-applicants-section-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 0 0;
}

/* Legacy classes - hidden (old structure replaced) */
.casting-card-body-top,
.casting-applicants-section-desktop,
.casting-applicants-section-mobile {
    display: none;
}

/* My Casting Card - Same style as Other Castings */
.casting-card:not(.casting-card-unpaid) {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Remove shadow from inner elements - shadow is on parent */
.my-casting-image-wrapper,
.my-casting-body-info {
    box-shadow: none;
}

.my-casting-image-wrapper {
    width: 100%;
    height: 240px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.my-casting-image-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    pointer-events: none;
}

/* Price tag on image (top left, black) */
.my-casting-price-tag-on-image {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
    white-space: nowrap;
}

/* Status badge on image (top right, green with dot) */
.my-casting-status-badge-on-image {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    white-space: nowrap;
}

.my-casting-status-badge-on-image.open {
    background-color: var(--status-open);
    color: white;
}

.my-casting-status-badge-on-image.paused {
    background-color: var(--status-paused);
    color: var(--text-dark);
}

/* ID tag (bottom left, above title) - removed, not needed in new design */
.my-casting-id-tag {
    display: none;
}

/* Title and location on image (bottom) */
.my-casting-image-text {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.my-casting-title-on-image {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.my-casting-meta-on-image {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

.my-casting-meta-on-image .location-pin-icon {
    width: 14px;
    height: 14px;
    color: #ef4444;
    flex-shrink: 0;
}

.my-casting-meta-on-image .meta-separator {
    margin: 0 4px;
}

/* White body section below image */
.my-casting-body-info {
    padding: 16px;
    background: #ffffff;
}

.my-casting-applicants-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.my-casting-applicants-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.my-casting-applicants-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-casting-applicants-count {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    background: none;
    padding: 0;
}

.my-casting-new-badge {
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.my-casting-applicants-avatars {
    display: flex;
    align-items: center;
    gap: 0;
}

.my-casting-applicant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    margin-left: -8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.my-casting-applicant-avatar:first-child {
    margin-left: 0;
}

.my-casting-applicant-count-badge {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 16px;
    background-color: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: -8px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.my-casting-applicants-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.my-casting-view-applicants-link {
    color: var(--status-open);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.my-casting-view-applicants-link:hover {
    opacity: 0.8;
}

.my-casting-view-applicants-link span {
    font-size: 14px;
}

/* Desktop styles for My Casting */
@media (min-width: 768px) {
    .my-casting-image-wrapper {
        height: 320px;
    }
}

@media (min-width: 1024px) {
    .my-casting-image-wrapper {
        height: 360px;
    }
    
    .my-casting-body-info {
        padding: 20px;
    }
}

.casting-applicants-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.casting-applicants-count-text {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
}

.casting-new-applicants-badge {
    background-color: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.casting-applicants-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.casting-applicants-avatars {
    display: flex;
    align-items: center;
    gap: -8px;
}

.casting-applicant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    margin-left: -8px;
}

.casting-applicant-avatar:first-child {
    margin-left: 0;
}

.casting-applicant-count-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #6b7280;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: -8px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.casting-view-applicants-link {
    color: #4CAF50;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.casting-view-applicants:active {
    opacity: 0.7;
}

/* ============================================
   Past Trips Cards (Compact)
   ============================================ */

.past-trips-section {
    margin-top: 40px;
    padding: 0 16px;
}

.past-trips-header {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.past-trips-grid {
    display: block;
}

.past-trip-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.past-trip-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.past-trip-image-locked {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.past-trip-info {
    flex: 1;
    min-width: 0;
}

.past-trip-location {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.past-trip-meta {
    font-size: 13px;
    color: var(--text-medium);
}

.past-trip-status {
    padding: 4px 12px;
    border-radius: 12px;
    background-color: var(--bg-light);
    color: var(--text-medium);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid #E0E0E0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    display: none; /* Hidden on desktop by default */
}

.mobile-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    padding: 0 8px;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    text-decoration: none;
    color: var(--text-medium);
    transition: color 0.2s ease;
    position: relative;
    min-width: 0;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    text-decoration: none;
}

.mobile-nav-item.active {
    color: var(--primary-orange);
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-nav-icon svg {
    width: 100%;
    height: 100%;
}

.mobile-nav-label {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.mobile-nav-notification {
    position: absolute;
    top: 0;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #F44336;
    border-radius: 50%;
    border: 2px solid white;
}

.mobile-nav-add-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--shadow-md);
    margin: -8px 0;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-nav-add-button:active {
    transform: scale(0.95);
}

/* Add padding to body when mobile nav is visible */
body.has-mobile-nav {
    padding-bottom: 80px;
}

/* Past trips desktop styles */
@media (min-width: 768px) {
    .past-trips-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 24px;
    }
    
    .past-trips-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .past-trip-card {
        padding: 16px;
        margin-bottom: 0;
    }

    .past-trip-image {
        width: 120px;
        height: 120px;
        border-radius: 12px;
    }
}

@media (min-width: 1024px) {
    .past-trips-section {
        max-width: 1200px;
    }
    
    .past-trips-grid {
        gap: 20px;
    }
}

/* Hide mobile nav on desktop */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }

    body.has-mobile-nav {
        padding-bottom: 0;
    }
}

/* Show mobile nav only on mobile */
@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.castings-container {
    padding: 0 8px;
}

@media (min-width: 768px) {
    .castings-container {
        padding: 0 16px;
    }
}

/* ============================================
   Other Castings Section (for clients)
   ============================================ */

.other-castings-section {
    margin-top: 24px;
    padding: 0 8px;
}

.other-castings-header {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding: 0 0 4px 0;
}

.other-castings-subtitle {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 16px;
}

.other-casting-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    overflow: hidden;
    display: block;
    color: inherit;
}

/* Image wrapper with overlay elements */
.other-casting-image-wrapper {
    width: 100%;
    height: 240px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.other-casting-image-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    pointer-events: none;
}

/* Price tag on image (top right) */
.other-casting-price-tag-on-image {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #10b981;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}

/* ID and days tag (bottom left) */
.other-casting-id-days-tag {
    position: absolute;
    bottom: 70px;
    left: 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

/* Title and location on image (bottom) */
.other-casting-image-text {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.other-casting-title-on-image {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.other-casting-location-on-image {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.other-casting-location-on-image .location-pin-icon {
    width: 14px;
    height: 14px;
    color: #ef4444;
    flex-shrink: 0;
}

/* White body section below image */
.other-casting-body-info {
    padding: 14px;
    background: white;
}

.other-casting-body-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.other-casting-date-section {
    flex: 1;
}

.other-casting-date-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.other-casting-date-value .date-icon {
    font-size: 16px;
}

.other-casting-duration-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.other-casting-duration-value .duration-icon {
    font-size: 16px;
}

.other-casting-client-section-body {
    flex: 1;
    text-align: right;
}

.other-casting-client-avatar-name {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.other-casting-client-avatar-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.other-casting-client-avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.other-casting-client-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.other-casting-client-name-badge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.other-casting-client-name-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.other-casting-client-badge-under-name {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.other-casting-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.other-casting-applicants-avatars {
    display: flex;
    align-items: center;
    gap: 0;
}

.other-casting-applicant-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    margin-left: -8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.other-casting-applicant-avatar-small:first-child {
    margin-left: 0;
}

.other-casting-applicant-count-badge {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 14px;
    background-color: #6b7280;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-left: -8px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.other-casting-applicant-count-badge.zero {
    background-color: #d1d5db;
    color: #6b7280;
    min-width: 28px;
    padding: 0;
}

.other-casting-engagement-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-medium);
}

.other-casting-views-stat,
.other-casting-applied-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (min-width: 768px) {
    .other-castings-section {
        padding: 0 24px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .other-casting-image-wrapper {
        height: 320px;
    }
}

@media (min-width: 1024px) {
    .other-castings-section {
        max-width: 700px;
    }
}

