/*!
 * Bootstrap Custom CSS - Migration from TailwindCSS
 * Proyecto: plataformaweb
 * Fecha: 2 de agosto de 2025
 *
 * Este archivo contiene extensiones personalizadas para Bootstrap 5.3.7
 * que replican funcionalidades específicas que se usaban con TailwindCSS
 */

/* ==============================================
   CUSTOM COMPONENTS FOR BOOTSTRAP
============================================== */

/* Custom buttons que mantienen el diseño original */
.custom-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.custom-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

.custom-button-primary {
    background-color: var(--bs-primary);
    color: white;
}

.custom-button-primary:hover {
    background-color: var(--bs-primary);
    filter: brightness(0.9);
    color: white;
}

.custom-button-secondary {
    background-color: var(--bs-secondary);
    color: white;
}

.custom-button-secondary:hover {
    background-color: var(--bs-secondary);
    filter: brightness(0.9);
    color: white;
}

.custom-button-outline {
    background-color: transparent;
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
}

.custom-button-outline:hover {
    background-color: var(--bs-primary);
    color: white;
}

.custom-button-ghost {
    background-color: transparent;
    color: var(--bs-gray-600);
}

.custom-button-ghost:hover {
    background-color: var(--bs-light);
    color: var(--bs-gray-800);
}

/* Custom cards con el diseño original */
.custom-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid var(--bs-gray-200);
    transition: box-shadow 0.2s ease-in-out;
}

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

.custom-card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--bs-gray-200);
    background-color: var(--bs-gray-50);
}

.custom-card-body {
    padding: 1.5rem;
}

.custom-card-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--bs-gray-200);
    background-color: var(--bs-gray-50);
}

/* Custom header y navigation */
.custom-header {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--bs-gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.custom-navbar {
    background: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--bs-gray-100);
}

.custom-sidebar {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--bs-gray-200);
    height: 100%;
}

/* Custom form elements */
.custom-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: white;
    font-size: 0.875rem;
    color: var(--bs-gray-900);
}

.custom-input::placeholder {
    color: var(--bs-gray-400);
}

.custom-input:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.custom-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: white;
    font-size: 0.875rem;
    color: var(--bs-gray-900);
    appearance: none;
    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 8 4 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;
}

.custom-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: white;
    font-size: 0.875rem;
    color: var(--bs-gray-900);
    resize: vertical;
}

.custom-textarea::placeholder {
    color: var(--bs-gray-400);
}

.custom-textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

/* Professional profile components */
.professional-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.professional-card:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
    transform: translateY(-2px);
}

.professional-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.professional-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
}

/* Navigation components */
.nav-link-custom {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.nav-link-active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.nav-link-inactive {
    color: var(--bs-gray-600);
}

.nav-link-inactive:hover {
    color: var(--bs-gray-900);
    background-color: var(--bs-gray-100);
}

/* Alert components */
.alert-custom {
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-success-custom {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

.alert-error-custom {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-warning-custom {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-info-custom {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* Badge components */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary-custom {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.badge-secondary-custom {
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    color: var(--bs-secondary);
}

.badge-success-custom {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning-custom {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger-custom {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ==============================================
   UTILITIES ESPECÍFICAS
============================================== */

/* Text shadows */
.text-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
}

.text-shadow-none {
    text-shadow: none;
}

/* Backdrop filters */
.backdrop-blur-subtle {
    backdrop-filter: blur(4px);
}

.backdrop-blur-strong {
    backdrop-filter: blur(20px);
}

/* Custom shadows */
.shadow-custom {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-brand {
    box-shadow: 0 10px 25px -5px rgba(var(--bs-primary-rgb), 0.1), 0 10px 10px -5px rgba(var(--bs-primary-rgb), 0.04);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-scale {
    transition: transform 0.2s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.line-clamp-none {
    overflow: visible;
    display: block;
    -webkit-box-orient: horizontal;
    -webkit-line-clamp: none;
}

/* Status indicators para profesionales */
.status-available {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-busy {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-offline {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Rating indicators */
.rating-excellent {
    color: #22c55e;
}

.rating-good {
    color: #3b82f6;
}

.rating-average {
    color: #f59e0b;
}

.rating-poor {
    color: #ef4444;
}

/* Aspect ratios */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-photo {
    aspect-ratio: 4 / 3;
}

/* Safe area utilities para mobile */
.safe-top {
    padding-top: env(safe-area-inset-top);
}

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.safe-left {
    padding-left: env(safe-area-inset-left);
}

.safe-right {
    padding-right: env(safe-area-inset-right);
}

/* Scrollbar styling */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: var(--bs-primary) var(--bs-light);
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: var(--bs-light);
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
    filter: brightness(0.8);
}

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

/* Spacing adicional que Bootstrap no tiene */
.p-18 {
    padding: 4.5rem !important;
}

.px-18 {
    padding-left: 4.5rem !important;
    padding-right: 4.5rem !important;
}

.py-18 {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
}

.m-18 {
    margin: 4.5rem !important;
}

.mx-18 {
    margin-left: 4.5rem !important;
    margin-right: 4.5rem !important;
}

.my-18 {
    margin-top: 4.5rem !important;
    margin-bottom: 4.5rem !important;
}

/* ==============================================
   MIGRATION COMPATIBILITY
============================================== */

/* Clases que mantienen compatibilidad temporal durante la migración */
.transition-custom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-bounce {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
