/* WooCommerce Custom Fields Frontend Styles */

.wc-custom-fields-wrapper {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.wc-custom-fields-wrapper h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #dc3545;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Photo Upload Container */
.photo-upload-container {
    padding: 15px;
    background-color: #fff;
    border: 1px dashed #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.photo-upload-container:hover {
    border-color: #007cba;
    background-color: #f5f9fd;
}

.photo-input-wrapper {
    margin-bottom: 15px;
}

.photo-file-input {
    display: none;
}

.photo-upload-btn {
    padding: 10px 20px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.photo-upload-btn:hover {
    background-color: #005a87;
}

.photo-upload-btn:active {
    transform: translateY(1px);
}

/* Photos List Grid */
.photos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    min-height: 20px;
}

.photo-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
    aspect-ratio: 1;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-item.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-item .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.photo-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
    border: none;
    border-radius: 3px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.photo-item .remove-btn:hover {
    background-color: #dc3545;
}

/* Photo Info */
.photo-info {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.photo-info p {
    margin: 5px 0;
    line-height: 1.6;
}

/* Info Box in Orders */
.wc-custom-fields-info {
    padding: 10px;
    background-color: #f5f5f5;
    border-left: 4px solid #007cba;
    margin: 10px 0;
}

.wc-custom-fields-info p {
    margin: 8px 0;
    font-size: 14px;
}

.wc-custom-fields-info strong {
    color: #333;
}

.wc-custom-fields-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.wc-custom-fields-photos img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wc-custom-fields-photos img:hover {
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wc-custom-fields-wrapper {
        padding: 15px;
    }
    
    .photos-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .photo-upload-btn {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .wc-custom-fields-wrapper {
        padding: 12px;
    }
    
    .photos-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wc-custom-fields-wrapper h3 {
        font-size: 16px;
    }
}
