/* WooCom Custom Fields - Photo Package Uploader Styles */

.wccf-container {
    margin-bottom: 20px;
}

.wccf-package-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

#wccf-price-display .price {
    font-size: 1.5em;
    font-weight: bold;
    color: #2a2a2a;
    margin-bottom: 15px;
}

.wccf-info-text {
    font-style: italic;
    color: #555;
    margin-top: -10px;
    margin-bottom: 20px;
}

#wccf-photo-upload-area {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #ddd;
    background-color: #f9f9f9;
}

#wccf-photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.wccf-upload-slot {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Creates a square aspect ratio */
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.wccf-upload-slot.has-image {
    border-style: solid;
    border-color: #b3d4fc;
}

.wccf-upload-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wccf-upload-label:hover {
    background-color: #e9e9e9;
}

.wccf-upload-label .plus-icon {
    font-size: 48px;
    color: #999;
    font-weight: 300;
}

.wccf-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wccf-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.wccf-upload-slot:hover .wccf-remove-btn {
    opacity: 1;
}

#wccf-upload-actions {
    margin-top: 20px !important;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

#wccf-progress-container {
    width: 100%;
    background-color: #eee;
    border-radius: 4px;
    margin-top: 10px;
}

#wccf-progress-bar {
    width: 0%;
    height: 20px;
    background-color: #4caf50;
    text-align: center;
    line-height: 20px;
    color: white;
    border-radius: 4px;
    transition: width 0.3s ease;
}

#wccf-upload-message {
    margin-top: 10px;
    font-weight: bold;
}

#wccf-upload-message.success {
    color: #28a745;
}

#wccf-upload-message.error {
    color: #dc3545;
}

/* --- Mobile & Layout Fixes --- */
.product-type-simple form.cart {
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    #wccf-photo-upload-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .wccf-upload-label .plus-icon {
        font-size: 36px;
    }
}
