/**
 * Card-Based Order Form
 * 
 * Enhanced styling for the customer order form using a card-based UI to exactly match the edit form
 */

/* Container styling */
.customer-order-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-sizing: border-box;
}

.customer-order-edit {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.customer-order-edit h2 {
    color: #007cba;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Card styling for form sections */
.form-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* Section headers */
.form-section h3 {
    background-color: #f8f9fa;
    color: #333;
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: 600;
    position: relative;
}

/* Form groups within cards */
.form-group {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    position: relative;
}

.form-group:last-child {
    border-bottom: none;
}

.form-group:hover {
    background-color: #f9f9f9;
}

/* Label styling */
.customer-order-edit label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

/* Global box-sizing */
.customer-order-edit * {
    box-sizing: border-box;
}

.customer-order-edit form,
.form-section,
.form-group {
    width: 100%;
    box-sizing: border-box;
}

/* Input field styling */
.customer-order-edit input[type="text"],
.customer-order-edit input[type="tel"],
.customer-order-edit input[type="email"],
.customer-order-edit input[type="date"],
.customer-order-edit select,
.customer-order-edit textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
    max-width: 100%;
}

.customer-order-edit input:focus,
.customer-order-edit select:focus,
.customer-order-edit textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(111, 24, 52, 0.1);
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* Cake type toggle styling */
.cake-type-toggle {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.cake-type-toggle label {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 180px;
    border: 1px solid #ddd;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.cake-type-toggle label:hover {
    background-color: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cake-type-toggle input[type="radio"] {
    margin-right: 10px;
    width: auto;
}

.active-type {
    background-color: #007cba !important;
    color: white !important;
    border-color: #007cba !important;
    box-shadow: 0 2px 6px rgba(111,24,52,0.4) !important;
}

.active-type span {
    color: white !important;
    font-weight: bold !important;
}

/* Sugar paste message styling */
.toggle-message {
    padding: 15px 20px;
    margin: 0;
    background-color: #fffaf0;
    border-left: 4px solid #ff9800;
    border-radius: 0;
    display: none;
}

/* Dynamic fields container styling */
#dynamic-fields-container {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Form actions section */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
    gap: 10px;
    width: 100%;
    padding: 0 20px;
}

/* Main submit button styling */
.submit-button {
    background-color: #007cba;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
    text-transform: none;
    letter-spacing: 0.5px;
}

.submit-button:hover {
    background-color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.button-icon {
    font-size: 20px;
}

/* Loading state */
.loading {
    position: relative;
}

.loading .button-icon {
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Popup styling */
#order-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#order-popup > span {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

#order-popup button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#order-popup button:hover {
    background-color: #495057;
}

#order-popup .success-message {
    color: #4caf50;
    font-size: 18px;
    display: block;
}

#order-popup .error-message {
    color: #f44336;
    font-size: 18px;
    display: block;
}

#order-popup .icon {
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

/* AJAX response styling */
.ajax-response {
    display: none;
    margin: 15px 0;
}

/* Form grid layout for desktop and tablets */
@media (min-width: 992px) {
    .customer-order-edit {
        display: block;
        width: 100%;
    }

    /* Use grid layout for large screens to organize form sections */
    .customer-order-edit form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
        width: 100%;
    }

    /* Make specific elements span the full width */
    .customer-order-edit h2,
    .ajax-response,
    .form-actions,
    .customer-order-edit form > .form-section:nth-child(5),  /* Photo section */
    .customer-order-edit form > .form-section:nth-child(4) { /* Pickup details */
        grid-column: 1 / -1; /* Span all columns */
        width: 100%;
    }
    
    /* Ensure form sections take full width of their grid area */
    .customer-order-edit form > .form-section {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .customer-order-edit {
        display: block;
        width: 100%;
    }
    
    .customer-order-edit form {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 15px;
        width: 100%;
    }
    
    .form-section {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .form-group {
        padding: 12px 15px;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .customer-order-container {
        padding: 15px 10px;
        width: 100%;
    }
    
    .customer-order-edit {
        width: 100%;
    }
    
    .customer-order-edit form {
        width: 100%;
    }
    
    .customer-order-edit h2 {
        font-size: 20px;
        padding-bottom: 10px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .form-section {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .form-section h3 {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .form-group {
        padding: 10px 15px;
    }
    
    .cake-type-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .cake-type-toggle label {
        width: 100%;
        min-width: unset;
    }
    
    .submit-button {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 16px 30px;
        font-size: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    #order-popup > span {
        padding: 20px 15px;
        width: 85%;
    }
}

/* Animation styles */
.form-section {
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.form-section:nth-child(2) {
    animation-delay: 0.1s;
}

.form-section:nth-child(3) {
    animation-delay: 0.2s;
}

.form-section:nth-child(4) {
    animation-delay: 0.3s;
}

.form-section:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(111, 24, 52, 0.1) !important;
}

/* Active section for mobile */
.active-section {
    box-shadow: 0 0 0 3px #007cba !important;
}

/* Card hover and focus effects */
.hover-card {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.focus-card {
    box-shadow: 0 0 0 3px rgba(111, 24, 52, 0.3);
}

/* Active field during input */
.active-field {
    background-color: #f8f9fa;
    box-shadow: inset 0 0 0 2px rgba(111, 24, 52, 0.2);
}

/* File input styles */
.form-group input[type="file"] {
    background-color: #f8f9fa;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
}

.form-group input[type="file"]:hover {
    background-color: #f0f0f0;
}

.file-preview {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    display: inline-block;
}

.file-info {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Enhanced datepicker styling */
.card-datepicker {
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    padding: 10px !important;
}

.card-datepicker .ui-datepicker-header {
    background-color: #007cba !important;
    color: white !important;
    border-radius: 6px !important;
}

.card-datepicker .ui-datepicker-title {
    font-weight: bold !important;
}

.card-datepicker .ui-datepicker-calendar th {
    font-weight: bold !important;
}

.card-datepicker .ui-datepicker-calendar td {
    padding: 3px !important;
}

.card-datepicker .ui-state-default {
    border-radius: 4px !important;
    text-align: center !important;
}

.card-datepicker .ui-state-active {
    background-color: #007cba !important;
    color: white !important;
}

.mobile-datepicker {
    width: 90% !important;
    left: 5% !important;
    font-size: 16px !important;
}

.mobile-datepicker .ui-datepicker-calendar td a {
    padding: 10px 8px !important;
}

/* ===== ENHANCED UI COMPONENTS ===== */

/* Radio Cards for Sxedio (Shape) */
.radio-cards-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.radio-card {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.radio-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(111, 24, 52, 0.15);
    transform: translateY(-2px);
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card input[type="radio"]:checked + .card-content {
    color: #007cba;
}

.radio-card input[type="radio"]:checked ~ .card-content {
    color: #007cba;
}

.radio-card input[type="radio"]:checked {
    background-color: #007cba;
}

.radio-card.selected,
.radio-card:has(input:checked) {
    border-color: #007cba;
    background-color: #007cba;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(111, 24, 52, 0.2);
}

.radio-card.selected .card-text,
.radio-card:has(input:checked) .card-text {
    color: #ffffff;
    font-weight: 600;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: unset;
    gap: 8px;
	padding-left: 15px !important;
}

.card-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.card-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
}

/* Toggle Button for Ipsos (Height) */
.toggle-group {
    margin-top: 10px;
}

.toggle-container {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 25px;
    padding: 4px;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.toggle-container input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-option {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    z-index: 2;
    position: relative;
    margin: 0;
}

.toggle-option:hover {
    color: #333;
}

.toggle-container input[type="radio"]:checked + .toggle-option {
    color: #fff;
    font-weight: 600;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background-color: #007cba;
    border-radius: 20px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.toggle-container input[type="radio"]:nth-child(2):checked ~ .toggle-slider {
    transform: translateX(100%);
}

/* Button Group for Size */
.size-buttons-container {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid #e8ecef;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.size-buttons-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007cba, #495057, #007cba);
    opacity: 0.1;
}

.size-buttons-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    justify-items: center;
    align-items: center;
}

.size-button {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7);
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 80px;
    min-height: 60px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.size-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(111, 24, 52, 0.1), transparent);
    transition: left 0.5s ease;
}

.size-button:hover::before {
    left: 100%;
}

.size-button:hover {
    border-color: #007cba;
    box-shadow: 
        0 8px 16px rgba(111, 24, 52, 0.15),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(145deg, #ffffff 0%, #f0f8ff 100%);
}

.size-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.size-button.selected,
.size-button:has(input:checked) {
    border-color: #007cba;
    background: linear-gradient(145deg, #007cba 0%, #495057 100%);
    color: #ffffff;
    box-shadow: 
        0 8px 20px rgba(111, 24, 52, 0.3),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-4px) scale(1.05);
}

.size-button.selected .size-text,
.size-button:has(input:checked) .size-text {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.size-button.selected::after,
.size-button:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    color: #007cba;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmarkPop 0.3s ease;
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.size-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
    transform: none !important;
}

.size-text {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
    letter-spacing: 0.3px;
}

/* Slider for Size (Legacy - Keep for fallback) */
.slider-container {
    margin-top: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-value {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 10px;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Checkbox Cards Grid for Gefsi (Flavors) */
.checkbox-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.checkbox-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin: 0;
}

.checkbox-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 10px rgba(111, 24, 52, 0.15);
    transform: translateY(-1px);
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card input[type="checkbox"]:checked + .card-content {
    background-color: #007cba;
    color: white;
}

.checkbox-card input[type="checkbox"]:checked + .card-content .checkmark {
    opacity: 1;
    transform: scale(1);
}

.checkbox-card.selected,
.checkbox-card:has(input:checked) {
    border-color: #007cba;
    background-color: #007cba;
    color: #ffffff;
}

.checkbox-card.selected .card-content,
.checkbox-card:has(input:checked) .card-content {
    color: #ffffff;
}

.checkbox-card.selected .card-text,
.checkbox-card:has(input:checked) .card-text {
    color: #ffffff;
    font-weight: 600;
}

.checkbox-card .card-content {
    position: relative;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-card .card-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.checkmark {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #4caf50;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.checkbox-card.exclusive {
    border-color: #ff9800;
}

.checkbox-card.exclusive:hover {
    border-color: #f57c00;
}

.checkbox-card.exclusive.selected,
.checkbox-card.exclusive:has(input:checked) {
    background-color: #ff9800;
    border-color: #ff9800;
    color: #ffffff;
}

.checkbox-card.exclusive.selected .card-text,
.checkbox-card.exclusive:has(input:checked) .card-text {
    color: #ffffff;
    font-weight: 600;
}

.selection-info {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* Image Cards for Exoterika (Covering) */
.image-cards-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 0;
}

.image-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(111, 24, 52, 0.15);
    transform: translateY(-2px);
}

.image-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.image-card.selected,
.image-card:has(input:checked) {
    border-color: #007cba;
    background-color: #007cba;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(111, 24, 52, 0.2);
}

.image-card.selected .card-text,
.image-card:has(input:checked) .card-text {
    color: #ffffff;
    font-weight: 600;
}

.image-card .card-image {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.image-card .radio-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background-color: white;
    transition: all 0.3s ease;
}

.image-card.selected .radio-indicator,
.image-card:has(input:checked) .radio-indicator {
    border-color: #007cba;
    background-color: #007cba;
}

.image-card.selected .radio-indicator::after,
.image-card:has(input:checked) .radio-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

/* Conditional Text Field for Coloring */
#coloring-field {
    transition: all 0.3s ease;
    overflow: hidden;
}

#coloring-field.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .radio-cards-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .radio-card {
        min-width: unset;
    }
    
    .toggle-container {
        max-width: 100%;
    }
    
    .checkbox-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .image-cards-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .slider-container {
        padding: 15px;
    }
    
    .size-buttons-container {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .size-buttons-group {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .size-button {
        min-width: 70px;
        min-height: 55px;
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .size-button:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .size-button.selected,
    .size-button:has(input:checked) {
        transform: translateY(-3px) scale(1.03);
    }
}

@media (max-width: 480px) {
    .checkbox-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checkbox-card .card-text {
        font-size: 12px;
    }
    
    .image-cards-group {
        grid-template-columns: 1fr;
    }
    
    .size-buttons-container {
        padding: 15px 10px;
        margin-top: 12px;
    }
    
    .size-buttons-group {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .size-button {
        min-width: 60px;
        min-height: 50px;
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .size-button:hover {
        transform: translateY(-1px) scale(1.01);
    }
    
    .size-button.selected,
    .size-button:has(input:checked) {
        transform: translateY(-2px) scale(1.02);
    }
    
    .size-button.selected::after,
    .size-button:has(input:checked)::after {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: 4px;
        right: 6px;
    }
}