/* Custom styles for InterSpark Flask app */

/* Line clamp utilities for better browser compatibility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skills Search Components */
.skills-autocomplete-dropdown {
    max-height: 120px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    z-index: 50;
}

.skill-bubble {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background-color: #DBEAFE;
    color: #1D4ED8;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.skill-bubble:hover {
    background-color: #BFDBFE;
}

.skill-bubble button {
    margin-left: 0.25rem;
    color: #2563EB;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease;
}

.skill-bubble button:hover {
    color: #DC2626;
    background-color: rgba(220, 38, 38, 0.1);
}

/* Compact search bars */
.search-bar-compact {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
}

.search-bar-compact .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-bar-compact .form-row:last-child {
    margin-bottom: 0;
}

/* Form styles */
.form-radio {
    color: #3b82f6;
}

.form-radio:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom alert styles */
.alert {
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

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

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile responsive text */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }

    .search-bar-compact .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .search-bar-compact .form-row>div {
        width: 100%;
    }
}

/* Focus styles for better accessibility */
.focus-ring:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Profile Picture Upload Styles */
.profile-picture-container {
    position: relative;
    display: inline-block;
}

.profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.profile-picture-container:hover .profile-picture-overlay {
    opacity: 1;
}

.profile-picture-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.profile-picture-delete-btn:hover {
    background-color: #dc2626;
}

.upload-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

/* Image upload drag and drop styles */
.image-drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.image-drop-zone:hover,
.image-drop-zone.drag-over {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}