/* Custom CSS for ESCP Conference Website */

/* Additional custom styles beyond Tailwind */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ASP.NET Control Styling - Standardized */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="url"],
select {
    @apply w-full px-4 py-2.5 border-2 border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400 focus:border-primary-500 dark:focus:border-primary-400 transition-all bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-sm;
    min-height: 42px;
    font-size: 14px;
    line-height: 1.5;
}

textarea {
    @apply w-full px-4 py-2.5 border-2 border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400 focus:border-primary-500 dark:focus:border-primary-400 transition-all bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-sm;
    min-height: 120px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    @apply text-gray-400 dark:text-gray-500;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    @apply outline-none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="password"]:focus,
.dark input[type="date"]:focus,
.dark input[type="time"]:focus,
.dark input[type="number"]:focus,
.dark input[type="tel"]:focus,
.dark input[type="url"]:focus,
.dark select:focus,
.dark textarea:focus {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.dark select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%9ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="file"] {
    @apply block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100;
}

/* ASP.NET GridView Styling */
table {
    @apply min-w-full divide-y divide-gray-200;
}

table thead {
    @apply bg-gray-50;
}

table thead th {
    @apply px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider;
}

table tbody {
    @apply bg-white divide-y divide-gray-200;
}

table tbody tr {
    @apply hover:bg-gray-50 transition-colors;
}

table tbody td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

/* Form Validation Styles */
.field-validation-error {
    @apply text-red-600 text-sm mt-1 flex items-center;
}

.field-validation-error::before {
    content: "⚠ ";
    @apply mr-1;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    @apply border-red-500 ring-red-500;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Registration Spinner Overlay */
.registration-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.registration-spinner-overlay.hidden {
    display: none;
}

.registration-spinner-container {
    text-align: center;
    padding: 2rem;
}

.modern-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: #ef4444;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #f43f5e;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #ec4899;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
}

.spinner-ring:nth-child(4) {
    border-top-color: #f472b6;
    width: 30%;
    height: 30%;
    top: 35%;
    left: 35%;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner-text {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Dark mode support for spinner */
.dark .registration-spinner-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.dark .spinner-text {
    color: #f9fafb;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-400 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-500;
}

/* ============================================
   PROFESSIONAL HEADER STYLES - ALL SCREEN SIZES
   ============================================ */

/* Site Header - Professional Responsive Styles */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

/* Ensure header doesn't cause horizontal scroll */
.nav-bar,
.nav-bar > div,
.nav-bar .max-w-7xl {
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile Header (up to 640px) */
@media (max-width: 640px) {
    .nav-bar {
        height: 3.5rem;
        min-height: 3.5rem;
    }
    
    .nav-bar .h-20 {
        height: 3.5rem !important;
        min-height: 3.5rem !important;
    }
    
    /* Compact navigation items */
    .nav-bar .flex.justify-between {
        gap: 0.5rem;
    }
    
    /* Logo sizing */
    .nav-bar img[alt*="Conference"] {
        max-height: 2.5rem;
        height: auto;
        width: auto;
    }
    
    /* Mobile menu button */
    #mobile-menu-button {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
    
    /* Register button in mobile menu */
    #mobile-menu .btn-primary-modern {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Tablet Header (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .nav-bar {
        height: 4rem;
        min-height: 4rem;
    }
    
    .nav-bar .h-20 {
        height: 4rem !important;
    }
    
    /* Tablet navigation spacing */
    .nav-bar .lg\\:flex {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
}

/* Desktop Header (1025px and above) */
@media (min-width: 1025px) {
    .nav-bar {
        height: 5rem;
        min-height: 5rem;
    }
    
    .nav-bar .h-20 {
        height: 5rem !important;
    }
    
    /* Desktop navigation spacing */
    .nav-bar .lg\\:flex {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.625rem 1rem !important;
        font-size: 0.9375rem !important;
    }
}

/* Large Desktop Header (1280px and above) */
@media (min-width: 1280px) {
    .nav-bar .max-w-7xl {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Admin Header - Professional Responsive Styles */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

/* Ensure admin header doesn't cause horizontal scroll */
.admin-header,
.admin-header > div {
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile Admin Header (up to 640px) */
@media (max-width: 640px) {
    .admin-header {
        height: 64px !important;
        min-height: 64px !important;
    }
    
    .admin-header > div {
        height: 64px !important;
        min-height: 64px !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Compact header items */
    .admin-header .flex.items-center.justify-between {
        gap: 0.5rem;
    }
    
    /* Logo sizing */
    .admin-header .w-10.h-10 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

/* Tablet Admin Header (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .admin-header {
        height: 68px !important;
        min-height: 68px !important;
    }
    
    .admin-header > div {
        height: 68px !important;
        min-height: 68px !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* Desktop Admin Header (1025px and above) */
@media (min-width: 1025px) {
    .admin-header {
        height: 72px !important;
        min-height: 72px !important;
    }
    
    .admin-header > div {
        height: 72px !important;
        min-height: 72px !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Large Desktop Admin Header (1280px and above) */
@media (min-width: 1280px) {
    .admin-header > div {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Header Button Consistency - Professional Sizing */
#sidebarToggle,
#themeToggle,
#mobile-menu-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* Professional Header Buttons - Standard Width */
/* Icon Buttons (Hamburger, Theme Toggle) */
#sidebarToggle,
#mobile-menu-button,
#themeToggle {
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    max-width: 2.5rem !important;
    max-height: 2.5rem !important;
    box-sizing: border-box;
}

#sidebarToggle svg,
#mobile-menu-button svg,
#themeToggle svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* User Profile Button - Standard Height */
#userProfileTrigger {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    max-height: 2.5rem !important;
    box-sizing: border-box;
}

/* Register Button - Standard Height */
.btn-primary-modern {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    max-height: 2.5rem !important;
    box-sizing: border-box;
}

/* Mobile - Compact Professional Size */
@media (max-width: 640px) {
    /* Icon Buttons */
    #sidebarToggle,
    #mobile-menu-button,
    #themeToggle {
        width: 2.25rem !important;
        height: 2.25rem !important;
        min-width: 2.25rem !important;
        min-height: 2.25rem !important;
        max-width: 2.25rem !important;
        max-height: 2.25rem !important;
    }
    
    #sidebarToggle svg,
    #mobile-menu-button svg,
    #themeToggle svg {
        width: 1.125rem !important;
        height: 1.125rem !important;
    }
    
    /* User Profile Button */
    #userProfileTrigger {
        height: 2.25rem !important;
        min-height: 2.25rem !important;
        max-height: 2.25rem !important;
    }
    
    /* Hide user avatar icon on small screens */
    #userProfileTrigger .user-avatar,
    #userProfileTrigger .flex-shrink-0.relative,
    #userProfileTrigger > div.flex-shrink-0 {
        display: none !important;
    }
    
    /* Hide online status indicator on small screens */
    #userProfileTrigger .absolute {
        display: none !important;
    }
    
    /* Register Button */
    .btn-primary-modern {
        height: 2.25rem !important;
        min-height: 2.25rem !important;
        max-height: 2.25rem !important;
    }
}

/* Prevent header from causing layout shifts */
.nav-bar,
.admin-header {
    will-change: transform;
    transform: translateZ(0);
}

/* Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

/* Modern Admin Styles */
.card {
    @apply bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-100 dark:border-gray-700 p-6 hover:shadow-xl transition-all duration-300;
}

.btn-primary {
    @apply bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 dark:from-primary-500 dark:to-primary-600 text-white font-semibold px-6 py-3 rounded-xl shadow-md hover:shadow-lg transition-all duration-200;
}

.btn-secondary {
    @apply bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-200 font-semibold px-6 py-3 rounded-xl hover:bg-gray-200 dark:hover:bg-gray-600 transition-all duration-200;
}

.input-field {
    @apply w-full text-gray-900 dark:text-gray-100;
    width: 100% !important;
    min-height: 48px;
    font-size: 15px;
    line-height: 1.6;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.input-field:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1), 0 2px 4px -1px rgba(14, 165, 233, 0.06);
    transform: translateY(-1px);
}

.input-field:focus {
    @apply outline-none;
    border-color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1), 0 4px 12px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.input-field::placeholder {
    @apply text-gray-400 dark:text-gray-500;
    opacity: 0.8;
    font-weight: 400;
}

.dark .input-field {
    background: linear-gradient(to bottom, #1f2937, #111827);
    border-color: #374151;
    color: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark .input-field:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 6px -1px rgba(56, 189, 248, 0.2), 0 2px 4px -1px rgba(56, 189, 248, 0.1);
}

.dark .input-field:focus {
    border-color: #38bdf8;
    background: #1f2937;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2), 0 4px 12px rgba(56, 189, 248, 0.25);
}

textarea.input-field {
    min-height: 140px;
    padding: 1rem 1.25rem;
    resize: vertical;
    font-family: inherit;
}

input[type="number"].input-field {
    -moz-appearance: textfield;
}

input[type="number"].input-field::-webkit-outer-spin-button,
input[type="number"].input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nav-item.active {
    @apply bg-cyan-500/20 text-white;
}

.nav-item:not(.active):hover {
    @apply bg-white/10;
}

/* Modern Table Styles */
.table {
    @apply min-w-full divide-y divide-gray-200 dark:divide-gray-700;
}

.table thead {
    @apply bg-gray-50 dark:bg-gray-900/50;
}

.table thead th {
    @apply px-6 py-4 text-left text-xs font-bold text-gray-700 dark:text-gray-300 uppercase tracking-wider;
}

.table tbody {
    @apply bg-white dark:bg-gray-800 divide-y divide-gray-100 dark:divide-gray-700;
}

.table tbody tr {
    @apply hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-all duration-200;
}

.table tbody td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-700 dark:text-gray-300;
}

/* Status Badges */
.badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold;
}

.badge-success {
    @apply bg-green-100 dark:bg-green-900/50 text-green-800 dark:text-green-200;
}

.badge-warning {
    @apply bg-yellow-100 dark:bg-yellow-900/50 text-yellow-800 dark:text-yellow-200;
}

.badge-danger {
    @apply bg-red-100 dark:bg-red-900/50 text-red-800 dark:text-red-200;
}

.badge-info {
    @apply bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200;
}

/* Glassmorphism Effect */
.glass {
    @apply bg-white/80 dark:bg-gray-800/80 backdrop-blur-lg border border-white/20 dark:border-gray-700/50;
}

/* Gradient Text */
.gradient-text {
    @apply bg-gradient-to-r from-primary-600 via-primary-500 to-accent-500 dark:from-primary-400 dark:via-primary-300 dark:to-accent-400 bg-clip-text text-transparent font-bold;
}

/* Professional Enhancements */
.stat-card {
    @apply bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-lg border border-gray-100 dark:border-gray-700 hover:shadow-xl transition-all duration-300;
}

.action-card {
    @apply bg-gradient-to-r from-primary-50 to-accent-50 dark:from-primary-900/20 dark:to-accent-900/20 rounded-xl p-4 border border-primary-100 dark:border-primary-800 hover:shadow-md transition-all duration-200;
}

.status-badge {
    @apply inline-flex items-center px-3 py-1.5 rounded-lg text-xs font-semibold;
}

/* Professional Shadows */
.shadow-professional {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-professional-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Overrides */
.dark .card {
    @apply bg-gray-800 border-gray-700;
}

/* Enhanced form field compatibility */
input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="number"]:disabled,
select:disabled,
textarea:disabled {
    @apply bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 cursor-not-allowed opacity-60;
}

input[type="text"].input-validation-error,
input[type="email"].input-validation-error,
input[type="password"].input-validation-error,
input[type="number"].input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    @apply border-red-500 dark:border-red-400 focus:ring-red-500 dark:focus:ring-red-400 focus:border-red-500 dark:focus:border-red-400;
}

input[type="text"].input-validation-error:focus,
input[type="email"].input-validation-error:focus,
input[type="password"].input-validation-error:focus,
input[type="number"].input-validation-error:focus,
select.input-validation-error:focus,
textarea.input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.dark input[type="text"].input-validation-error:focus,
.dark input[type="email"].input-validation-error:focus,
.dark input[type="password"].input-validation-error:focus,
.dark input[type="number"].input-validation-error:focus,
.dark select.input-validation-error:focus,
.dark textarea.input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

/* Checkbox and Radio Button Styling */
input[type="checkbox"],
input[type="radio"] {
    @apply w-5 h-5 border-2 border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400 focus:ring-offset-0 transition-all cursor-pointer;
    accent-color: #0ea5e9;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    @apply bg-primary-500 dark:bg-primary-500 border-primary-500 dark:border-primary-500;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    @apply opacity-50 cursor-not-allowed;
}

.dark input[type="checkbox"]:checked,
.dark input[type="radio"]:checked {
    @apply bg-primary-500 border-primary-500;
}

/* Label styling for better contrast */
label {
    @apply text-gray-700 dark:text-gray-200;
}

.dark label {
    @apply text-gray-200;
}

