/* Spartera Ideafactory - Custom Styles */

/* Base Font */
* {
    font-family: 'Poppins', system-ui, sans-serif;
}

/* Glassmorphism Effect */
.glassmorphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glassmorphism {
    background: rgba(15, 23, 42, 0.95);
}

/* Gradient Border */
.gradient-border {
    background: linear-gradient(135deg, #0099CC 0%, #1a365d 100%);
    padding: 1px;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Status Badge Styles */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Idea Card Styles */
.idea-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.idea-card:hover {
    transform: translateY(-4px);
}

.idea-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Priority Indicator */
.priority-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 8px 0 0 8px;
}

.priority-high {
    background: #EF4444;
}

.priority-medium {
    background: #F59E0B;
}

.priority-low {
    background: #10B981;
}

/* Upvote Button */
.upvote-btn {
    transition: all 0.2s ease;
}

.upvote-btn:hover {
    transform: scale(1.1);
}

.upvote-btn.voted {
    background: linear-gradient(135deg, #0099CC 0%, #1a365d 100%);
    color: white;
}

/* Form Elements */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.2);
    border-color: #0099CC;
}

/* Dark mode form input styling */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="url"],
.dark textarea,
.dark select {
    background-color: rgb(55 65 81);
    color: rgb(229 231 235);
    border-color: rgb(75 85 99);
}

.dark input[type="text"]::placeholder,
.dark input[type="email"]::placeholder,
.dark input[type="url"]::placeholder,
.dark textarea::placeholder {
    color: rgb(156 163 175);
}

/* Enhanced form validation styles */
.form-field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

.form-field-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Dark mode support for validation */
.dark .form-field-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 1px #f87171;
}

.dark .form-field-error:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

/* Notification Toast Styles */
.notification-toast {
    max-width: 400px;
    word-wrap: break-word;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-toast .flex {
    align-items: flex-start;
}

.notification-toast p {
    line-height: 1.5;
    margin: 0;
}

/* Dark mode card backgrounds */
.dark .idea-card {
    background-color: rgb(55 65 81);
}

/* Fix dark mode text visibility */
.dark .text-gray-900 {
    color: rgb(243 244 246);
}

/* Type and Priority button dark mode fixes */
.dark .type-card,
.dark .priority-btn {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

.dark .type-card:hover,
.dark .priority-btn:hover {
    background-color: rgb(75 85 99);
}

.dark .type-card.selected,
.dark .priority-btn.selected {
    border-width: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0099CC;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Progress Bar */
.progress-bar {
    background: linear-gradient(90deg, #0099CC 0%, #1a365d 100%);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    background-color: #1a202c;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Badge Animations */
.badge-pulse {
    position: relative;
}

.badge-pulse::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    opacity: 0.5;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Type Selection Cards */
.type-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.type-card:hover {
    transform: translateY(-2px);
}

.type-card.selected {
    transform: scale(1.02);
}

/* Priority Buttons */
.priority-btn {
    transition: all 0.2s ease;
}

.priority-btn:hover {
    transform: translateY(-1px);
}

.priority-btn.selected {
    font-weight: 600;
}

/* Admin Badge */
.admin-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #E55A2B 100%);
}

/* Form Field Focus States */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    border-color: #0099CC;
    box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.1);
    outline: none;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="url"]:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #0099CC;
    box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.2);
}

/* Validation Message Styling */
.text-red-600.text-xs {
    font-weight: 500;
}

.dark .text-red-400.text-xs {
    font-weight: 500;
}

/* Button Hover States */
button:hover {
    transition: all 0.2s ease-in-out;
}

/* Success Modal Enhancement */
#successMessage .animate-slide-up {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .idea-card {
        font-size: 14px;
    }
    
    .priority-indicator {
        width: 3px;
    }
    
    .notification-toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .notification-toast .flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .notification-toast button {
        align-self: flex-end;
        margin-top: 0.25rem;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glassmorphism {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .idea-card {
        break-inside: avoid;
    }
    
    .notification-toast {
        display: none !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .animate-slide-up,
    .animate-slide-down,
    .animate-fade-in,
    .animate-pulse {
        animation: none;
    }
    
    .idea-card,
    .upvote-btn,
    .type-card,
    .priority-btn {
        transition: none;
    }
}

/* Focus indicators for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #0099CC;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-field-error {
        border-width: 2px;
    }
    
    .notification-toast {
        border-width: 2px;
        border-color: currentColor;
    }
}