/* Hide original add to cart button */
#add_to_cart_wrap {
    display: none !important;
}

/* Button styling - Make them reasonable size */
#saveMeasurementsBtn,
#addToCartFromMeasurement {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-width: 180px;
}

#saveMeasurementsBtn:hover,
#addToCartFromMeasurement:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Warning box styling */
#measurement_warning {
    border-left: 4px solid #0dcaf0;
    background-color: #cff4fc;
    animation: slideDown 0.3s ease-out;
}

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

/* Radio button styling */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Select measurement section transition */
#select_measurement_section {
    transition: all 0.3s ease;
    overflow: hidden;
}

#select_measurement_section.d-none {
    max-height: 0;
    opacity: 0;
}

/* Button container responsive */
@media (max-width: 767px) {
    #saveMeasurementsBtn,
    #addToCartFromMeasurement {
        max-width: 100% !important;
        min-width: 100%;
    }
}

/* Warning box animation */
#missing_fields_list {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Card hover effect */
.card.bg-light {
    transition: box-shadow 0.2s ease;
}

.card.bg-light:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Success state */
.alert-success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Measurement grid styles */
.measurement-grid .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-body {
    align-items: center;
    gap: 15px;
}

.measurement-image-container.w-75 {
    width: 75%;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.measurement-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 300px;
}

.measurement-input-container.w-25 {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 768px) {
    .card-body {
        flex-direction: column;
    }

    .measurement-image-container.w-75 {
        width: 100%;
        max-width: 200px;
    }
}