/* Custom Fridge Magnet Uploader Frontend Styles */

/* Notice on Product Page */
.cfmu-upload-notice {
    margin: 20px 0 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 10px;
    border-left: 5px solid #007cba;
    clear: both;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.cfmu-upload-notice h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
}

.cfmu-upload-notice p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 1em;
    line-height: 1.5;
}

.cfmu-quantity-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 6px;
}

.cfmu-info-icon {
    font-size: 1.2em;
}

.cfmu-upload-wrapper {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.cfmu-upload-wrapper:hover {
    border-color: #007cba;
    background-color: #f9f9f9;
}

.cfmu-upload-wrapper h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.cfmu-instruction {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

#cfmu-upload-container {
    margin-top: 15px;
}

.cfmu-upload-field {
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.2s ease;
}

.cfmu-upload-field:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cfmu-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cfmu-upload-header label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cfmu-status {
    font-size: 0.9em;
    font-weight: 500;
}

.cfmu-status.cfmu-success {
    color: #28a745;
}

.cfmu-status.cfmu-error {
    color: #dc3545;
}

.cfmu-upload-area {
    position: relative;
    min-height: 120px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cfmu-upload-area:hover {
    border-color: #007cba;
    background-color: #f8f9fa;
}

.cfmu-upload-area.cfmu-drag-over {
    border-color: #007cba;
    background-color: #e6f3ff;
    transform: scale(1.02);
}

.cfmu-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.cfmu-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    text-align: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.cfmu-upload-icon {
    font-size: 2em;
    margin-bottom: 8px;
    opacity: 0.6;
}

.cfmu-upload-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.cfmu-upload-info {
    font-size: 0.8em;
    color: #666;
}

.cfmu-preview {
    position: relative;
    text-align: center;
    padding: 10px;
}

.cfmu-preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.cfmu-preview-image:hover {
    transform: scale(1.05);
}

.cfmu-preview-actions {
    margin-top: 10px;
}

.cfmu-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.2s ease;
}

.cfmu-remove-btn:hover {
    background: #c82333;
}

.cfmu-progress {
    padding: 20px;
    text-align: center;
}

.cfmu-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cfmu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.cfmu-progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* Cart preview styles */
.cfmu-cart-preview {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.cfmu-cart-preview img {
    border-radius: 3px;
    border: 1px solid #ddd;
}

.cfmu-cart-preview span {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .cfmu-upload-wrapper {
        padding: 15px;
    }
    
    .cfmu-upload-field {
        padding: 10px;
    }
    
    .cfmu-upload-area {
        min-height: 100px;
    }
    
    .cfmu-upload-placeholder {
        height: 100px;
    }
    
    .cfmu-upload-icon {
        font-size: 1.5em;
    }
    
    .cfmu-upload-text {
        font-size: 0.9em;
    }
    
    .cfmu-preview-image {
        max-height: 150px;
    }
}

/* Animation for upload fields */
.cfmu-upload-field {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for add to cart button */
.single_add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success and error states */
.cfmu-upload-area.cfmu-success {
    border-color: #28a745;
    background-color: #f8fff9;
}

.cfmu-upload-area.cfmu-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* Hover effects */
.cfmu-upload-field:hover .cfmu-upload-area {
    border-color: #007cba;
}

.cfmu-upload-field:hover .cfmu-upload-placeholder {
    color: #007cba;
}

.cfmu-upload-field:hover .cfmu-upload-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Focus states for accessibility */
.cfmu-file-input:focus + .cfmu-upload-placeholder {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Custom scrollbar for upload fields container */
#cfmu-upload-fields {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

#cfmu-upload-fields::-webkit-scrollbar {
    width: 8px;
}

#cfmu-upload-fields::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#cfmu-upload-fields::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

#cfmu-upload-fields::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Cart Upload Link */
.cfmu-upload-link {
    background: #007cba;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.cfmu-upload-link:hover {
    background: #005a8b;
    transform: translateY(-1px);
    color: white !important;
} 