/**
 * Product Fields Styles (Updated for Dynamic Price)
 */

.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
    width: 45%;
    color: white;
}

.ui-datepicker .ui-datepicker-title select {
    font-size: 1em;
    margin: 0px;
    border: 0px;
}

.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover {
    border: 1px solid #8DC63F !important;
    background: #8DC63F !important;
    font-weight: normal;
    color: #ffffff;
}

.shbs-custom-fields {
    background: #edeedb;
    border-radius: 8px;
    padding: 25px;
}

.shbs-field-group {
    margin-bottom: 25px;
}

.shbs-field-group:last-child {
    margin-bottom: 0;
}

.shbs-field-group.error-field {
    background: #fff5f5;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #d63638;
}

.shbs-field-label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #013426;
}

.shbs-field-label .required {
    color: #d63638;
    margin-left: 2px;
}

.shbs-datepicker {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 12px center;
    background-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shbs-datepicker:focus {
    border-color: #F78F20;
    outline: none;
}

.shbs-datepicker.error-field {
    border-color: #d63638;
}

.shbs-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.shbs-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #F78F20;
}

.shbs-checkbox-text {
    flex: 1;
    line-height: 1.5;
}

.shbs-field-description {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.shbs-restrictions-info {
    margin-top: 12px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #d63638;
}

.shbs-restrictions-info strong {
    color: #d63638;
}

.shbs-restrictions-list {
    margin: 10px 0 0 20px;
    padding: 0;
    font-size: 14px;
    color: #666;
}

.shbs-restrictions-list li {
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Required checkbox styles */
.shbs-required-checkbox {
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.shbs-required-checkbox:hover {
    border-color: #F78F20;
}

.shbs-required-checkbox input[type="checkbox"]:checked {
    accent-color: #0F712C;
}

/* Time Required Pill Buttons */
.shbs-pill-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.shbs-pill-buttons input[type="radio"] {
    display: none;
}

.shbs-pill-button {
    display: inline-block;
    padding: 12px 24px;
    background: #ffffff;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #013426;
    transition: all 0.3s ease;
    user-select: none;
}

.shbs-pill-button:hover {
    color: #013426;
    background: #f8f9ef
}

.shbs-pill-buttons input[type="radio"]:checked + .shbs-pill-button {
    background: #10712c;
    color: #ffffff;
}

/* Time Required Pill Buttons */
.shbs-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shbs-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #013426;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    flex-shrink: 0;
}

.shbs-tooltip:hover {
    background: #8DC63F;
}

.shbs-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #013426;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    max-width: 400px;
    width: max-content;
    text-align: left;
    line-height: 1.5;
}

.shbs-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #013426;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.shbs-tooltip:hover::after,
.shbs-tooltip:hover::before {
    opacity: 1;
}

/* Hide field descriptions when using tooltips */
.shbs-field-group.has-tooltip .shbs-field-description {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shbs-custom-fields {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .shbs-field-label {
        font-size: 15px;
    }
    
    .shbs-datepicker {
        max-width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .shbs-checkbox-label {
        font-size: 15px;
    }
    
    .shbs-restrictions-list {
        margin-left: 15px;
        font-size: 13px;
    }
    
    .shbs-pill-buttons {
        gap: 8px;
    }
    
    .shbs-pill-button {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    /* Mobile tooltip adjustments */
    .shbs-tooltip::after {
        max-width: 300px;
        font-size: 13px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .shbs-tooltip::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .shbs-custom-fields {
        padding: 15px;
        margin: 15px -15px;
        border-radius: 0;
    }
    
    .shbs-pill-button {
        padding: 8px 14px;
        font-size: 13px;
    }
}