/* Custom CSS for PattayaGirls Platform - 2025 Modern Design */

/* Modern 2025 Color Palette */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
    --surface-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --neutral-900: #0f172a;
    --neutral-700: #334155;
    --neutral-500: #64748b;
    --neutral-100: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-elegant: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-strong: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Modern Body Styling */
body {
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--neutral-700);
    font-weight: 400;
}

.container {
    max-width: 1280px;
}

/* Typography Updates */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--neutral-900);
}

/* Modern Navigation Bar */
.navbar-dark {
    background: var(--primary-gradient) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-elegant);
    position: relative; /* Add this line */
    z-index: 1100;      /* And add this line */
}

.navbar-brand {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.025em;
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.75rem;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transform: translateY(-1px);
}

/* Clean, professional styling - no oversized hero boxes */

/* Modern Button System */
.btn {
    font-weight: 600;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #f43f5e 100%);
    box-shadow: 0 4px 14px 0 rgba(236, 72, 153, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(236, 72, 153, 0.35);
    background: linear-gradient(135deg, #e11d48 0%, var(--accent-pink) 100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(139, 92, 246, 0.35);
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
}

.btn-outline-primary {
    border: 2px solid var(--accent-purple);
    background: transparent;
    color: var(--accent-purple);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--accent-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(139, 92, 246, 0.35);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 1rem;
}

/* Modern Card System */
.card {
    background: var(--card-gradient);
    border: 1px solid var(--neutral-100);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-elegant);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: var(--accent-purple);
}

.card-img-top {
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-header {
    background: var(--surface-gradient);
    border-bottom: 1px solid var(--neutral-100);
    font-weight: 600;
    color: var(--neutral-700);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--surface-gradient);
    border-top: 1px solid var(--neutral-100);
    padding: 1rem 1.5rem;
}

/* Photo Gallery Enhancements */
.photo-gallery {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
}

.photo-gallery .carousel-item img {
    border-radius: 1.5rem;
}

.photo-gallery .carousel-indicators {
    margin-bottom: -0.5rem;
}

.photo-gallery .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 3px;
}

/* Remove duplicate card styles - using modern system above */

/* Image aspect ratio consistency */
.img-aspect-ratio {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.img-aspect-square {
    aspect-ratio: 1/1;
    object-fit: cover;
}

/* Worker profile photo grid */
.worker-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.worker-photos .photo-item {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 0.375rem;
}

.worker-photos img {
    border-radius: 0.375rem;
    transition: transform 0.2s ease;
}

.worker-photos img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Photo upload preview */
.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-preview-item {
    position: relative;
    width: 100px;
    aspect-ratio: 3/4;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 2px solid var(--bs-border-color);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--bs-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Modern Status Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
}

.status-pending {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    color: white !important;
}

.status-approved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.status-rejected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #f59e0b 100%) !important;
    color: white !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%) !important;
    color: white !important;
}





/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom form enhancements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--bs-primary);
}

/* Responsive image galleries */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-grid-item {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 0.375rem;
    position: relative;
}

/* Responsive aspect ratio classes for all images */
.aspect-ratio-3-4 {
    aspect-ratio: 3/4;
    overflow: hidden;
}

.aspect-ratio-3-4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Smaller thumbnails for overview pages - reduce card size instead of scaling */
.thumb-small .card-body {
    padding: 0.5rem;
}

.thumb-small .card-title {
    font-size: 0.9rem;
}

.thumb-small .card-text {
    font-size: 0.8rem;
}

.thumb-small .btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
}

/* Working Status Frame System */
.worker-photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
}

.worker-photo-container.working {
    border: 3px solid #22c55e; /* Green frame for working */
    box-shadow: 0 0 0 1px #22c55e, 0 4px 8px rgba(34, 197, 94, 0.3);
}

.worker-photo-container.not-working {
    border: 1px solid #e5e7eb; /* Subtle gray border for not working */
}

.working-status-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.working-status-overlay.working {
    background: linear-gradient(to top, rgba(34, 197, 94, 0.9), rgba(34, 197, 94, 0.7));
}

.working-status-overlay.not-working {
    background: linear-gradient(to top, rgba(107, 114, 128, 0.9), rgba(107, 114, 128, 0.7));
}

/* Venue photo aspect ratio */
.aspect-ratio-16-9 {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.aspect-ratio-16-9 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Infinite scroll loading indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    display: none;
}

.loading-indicator.show {
    display: block;
}

/* Worker grid container for infinite scroll */
#workers-grid {
    min-height: 400px;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-grid-item:hover img {
    transform: scale(1.1);
}

/* Profile stats */
.profile-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.profile-stat {
    flex: 1;
}

.profile-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-primary);
}

.profile-stat-label {
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

/* Admin panel enhancements */
.admin-action-buttons {
    display: flex;
    gap: 0.25rem;
}

.admin-action-buttons .btn {
    flex: 1;
    font-size: 0.875rem;
}

/* Chat modal styles */
.chat-messages {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
}

.chat-message {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    max-width: 70%;
}

.chat-message.sent {
    background: var(--bs-primary);
    color: white;
    margin-left: auto;
}

.chat-message.received {
    background: var(--bs-gray-800);
    color: var(--bs-gray-100);
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .card-footer,
    .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}
