/**
 * CollectionsScan - Custom CSS
 * Ultra-modern, minimalist design with white background and green accents
 */

/* Global Styles */
:root {
    --color-primary: #36B37E;      /* Soft Green */
    --color-primary-dark: #2C9F6F;
    --color-primary-light: #4DD996;
    --color-secondary: #6b7280;    /* Secondary Gray */
    --color-secondary-dark: #4b5563;
    --color-accent: #00C853;       /* Bright Green for interactions */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #36B37E;         /* Using primary for info */
    --color-text: #333333;         /* Dark Gray for text */
    --color-white: #FFFFFF;        /* Primary background */
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: none;
    outline: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--color-secondary-dark);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
}

.btn-error {
    background-color: var(--color-error);
    color: white;
}

.btn-warning {
    background-color: var(--color-warning);
    color: white;
}

/* Form Control Styles */
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--color-primary-light);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Card Styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.card-body {
    padding: 1rem;
    flex: 1 1 auto;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Glass Card Effect */
.glass-card {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

/* Page Transitions */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-image-container {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
    }
}

/* Flash Messages */
.flash-message {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.flash-message.success {
    background-color: var(--color-success);
    color: white;
}

.flash-message.error {
    background-color: var(--color-error);
    color: white;
}

.flash-message.warning {
    background-color: var(--color-warning);
    color: white;
}

.flash-message.info {
    background-color: var(--color-info);
    color: white;
}

/* Helpers */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-danger {
    color: var(--color-error);
}

.text-success {
    color: var(--color-success);
}

.hidden {
    display: none !important;
}

/* Transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}
.fade-enter, .fade-leave-to {
    opacity: 0;
}

/* Animation for flash messages */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    5% { opacity: 1; transform: translateY(0); }
    95% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0.9; }
}

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

/* Quick Edit Toolbar */
.tooltip-trigger {
    position: relative;
}

.tooltip {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    pointer-events: none;
}

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

.tooltip:after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.8);
}

.collection-dropdown {
    transition: opacity 0.2s, visibility 0.2s;
    max-height: 300px;
    overflow-y: auto;
}

.collection-dropdown.active {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* Hide hover functionality on mobile */
@media (hover: none) {
    .group:hover .group-hover\:opacity-100 {
        opacity: 0;
        visibility: hidden !important;
    }
}

/* Auto-resizing textarea */
.auto-resize-textarea {
    resize: none;
    overflow: hidden;
    min-height: 80px;
    transition: height 0.15s ease;
    line-height: 1.5;
    padding-top: 12px;
    padding-bottom: 12px;
    width: 100%;
}