/* Comgraphx Sticker Form Styles */

#cmg-sticker-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 0px; /* Reduced top and bottom padding */
    background: #ffffff;
    border-radius: 10px;
}

#cmg-sticker-form .fieldset {
    margin-bottom: 10px; /* Reduced from 15px */
}

#cmg-sticker-form .help-text {
    font-family: "Raleway", sans-serif;
    font-size: 14px; /* Reduced from 16px to match original */
    font-weight: 600; /* Reduced from 700 to match original */
    margin-bottom: 8px; /* Reduced from 10px */
    display: block;
    color: #333;
}

/* Hide BR immediately after help-text labels */
#cmg-sticker-form .help-text + br {
    display: none;
}

/* Fix spacing between radio options */
#cmg-sticker-form input[type="radio"] {
    margin-right: 8px;
    margin-bottom: 3px; /* Reduced from 5px */
    vertical-align: middle;
}

#cmg-sticker-form label {
    display: inline-block;
    font-size: 14px;
    margin-left: 5px;
    margin-bottom: 0;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    line-height: 1.3;
}

/* Create rows for radio + label + price */
#cmg-sticker-form .fieldset {
    display: block;
}

#cmg-sticker-form .fieldset input[type="radio"] {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

#cmg-sticker-form .fieldset input[type="radio"] + label {
    display: inline-block;
    vertical-align: middle;
    min-width: 100px;
}

/* Force each radio to be on its own line */
#cmg-sticker-form .fieldset br {
    content: "";
    display: block;
    height: 3px; /* Reduced from 5px */
}

/* BR between sections - reduce spacing */
#cmg-sticker-form > br {
    display: block;
    height: 5px; /* Small gap between sections */
    margin: 0;
}

#cmg-sticker-form label:hover {
    color: #005DA6;
}

#cmg-sticker-form .price_preview {
    color: #005ba8;
    display: inline-block;
    text-align: right;
    font-weight: 600;
    float: right;
    clear: right;
    font-size: 14px;
    min-width: 60px;
}

#cmg-sticker-form .custom-input {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: normal;
    border-radius: 8px;
    width: 48%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    margin-right: 4%;
}

#cmg-sticker-form .custom-input:last-child {
    margin-right: 0;
}

#cmg-sticker-form .custom-input:focus {
    outline: none;
    border-color: #005DA6;
    box-shadow: 0 0 5px rgba(0, 93, 166, 0.3);
}

#cmg-sticker-form #custom-input,
#cmg-sticker-form #custom-quantity {
    margin-top: 5px; /* Reduced from 8px */
    margin-bottom: 5px; /* Reduced from 10px */
}

#cmg-sticker-form #custom-input {
    display: flex;
    gap: 10px;
}

/* Fix button text wrapping */
#cmg-sticker-form #button-add-cart {
    background-color: #005DA6;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 16px; /* Reduced from 18px to prevent wrapping */
    padding: 14px 25px; /* Slightly reduced padding */
    margin: 10px auto 0; /* Reduced from 15px */
    display: block;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 280px; /* Reduced from 300px */
    white-space: nowrap;
}

#cmg-sticker-form #button-add-cart:hover {
    background-color: #278AD8;
}

#cmg-sticker-form #button-add-cart:disabled {
    background-color: #999;
    cursor: not-allowed;
}

#cmg-sticker-form #order-price {
    margin-right: 5px;
}

#cmg-sticker-form .loading {
    display: inline-block;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Cart per-sticker pricing */
.comgraphx-unit-price {
    color: #666;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

/* Responsive design */
@media (max-width: 600px) {
    #cmg-sticker-form {
        padding: 15px;
    }
    
    #cmg-sticker-form .custom-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    #cmg-sticker-form #custom-input {
        flex-direction: column;
    }
    
    #cmg-sticker-form .price_preview {
        display: block;
        margin-left: 25px;
        margin-top: 2px;
    }
    
    #cmg-sticker-form #button-add-cart {
        font-size: 16px;
        padding: 12px 20px;
    }
}