/* Tailored Packaging Custom Styles */

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Custom scrollbar for box grid */
#box-grid {
    position: relative;
}

#box-grid::-webkit-scrollbar {
    width: 8px;
}

#box-grid::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

#box-grid::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
    border: 1px solid #6b7280;
}

#box-grid::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Scroll indicator shadow */
#box-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}

/* Box option hover effects */
.box-option {
    position: relative;
    overflow: hidden;
}

.box-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.box-option:hover::before {
    left: 100%;
}

/* Logo upload area styling */
.logo-upload-area {
    border: 2px dashed #d1d5db;
    transition: border-color 0.3s, background-color 0.3s;
}

.logo-upload-area:hover {
    border-color: #3b82f6;
    background-color: #f8faff;
}

.logo-upload-area.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: scale(1.02);
}

/* 3D Canvas container */
.canvas-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Print constraint warnings */
.constraint-warning {
    animation: slideIn 0.3s ease-out;
}

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

/* Form enhancements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Pricing display */
.pricing-row {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
}

.pricing-row:last-child {
    border-bottom: none;
    border-top: 2px solid #3b82f6;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* Loading states */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .canvas-container {
        max-width: 100%;
    }
    
    #box-canvas {
        width: 100% !important;
        height: auto !important;
    }
    
    .box-option {
        text-align: center;
    }
}

/* Success/Error message styling */
.message-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.message-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Box dimension display */
.box-dimensions {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #374151;
}

/* Print area visualization */
.print-area-indicator {
    border: 2px solid #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #92400e;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Header branding */
.brand-logo {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
}

/* Footer styling */
.footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
    padding: 2rem 0;
    text-align: center;
    color: #6b7280;
}