/* File: wp-content/plugins/granite-3d-constructor/assets/css/wordpress-6.9-fixes.css */

/**
 * WordPress 6.9.0 Form Elements Fix
 * Fixes for select dropdown text positioning issues
 */

/* Target all select elements in constructor */
.granite-constructor-wrapper select {
    /* Reset any problematic WordPress core styles */
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    
    /* Force consistent styling */
    line-height: 1.5em !important;
    height: auto !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    vertical-align: baseline !important;
    box-sizing: border-box !important;
    
    /* Ensure text is properly aligned */
    display: inline-block !important;
    font-size: 16px !important;
    font-family: inherit !important;
}

/* Fix for option elements */
.granite-constructor-wrapper select option {
    line-height: 1.5 !important;
    padding: 8px 12px !important;
    min-height: 30px !important;
    display: flex !important;
    align-items: center !important;
}

/* Remove any WordPress core transforms */
.granite-constructor-wrapper select:focus {
    transform: none !important;
}

/* Fix for placeholder option */
.granite-constructor-wrapper select option[value=""] {
    color: #6c757d !important;
    opacity: 1 !important;
}

/* Specific fix for the problematic select */
#monument-category-select,
#product-type-select,
#granite-type-select,
#additional-elements-select {
    /* Force remove any WordPress positioning */
    position: static !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    
    /* Ensure text visibility */
    color: #333333 !important;
    background-color: #ffffff !important;
    
    /* Consistent border */
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
}

/* Hover and focus states */
#monument-category-select:hover,
#product-type-select:hover,
#granite-type-select:hover,
#additional-elements-select:hover,
#monument-category-select:focus,
#product-type-select:focus,
#granite-type-select:focus,
#additional-elements-select:focus {
    border-color: #1A2F3D !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26, 47, 61, 0.1) !important;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    .granite-constructor-wrapper select {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 14px 16px !important;
    }
    
    #monument-category-select,
    #product-type-select,
    #granite-type-select,
    #additional-elements-select {
        min-height: 50px !important;
    }
}

/* Emergency override for WordPress 6.9.0 form.css */
body .granite-constructor-wrapper select {
    all: revert;
}

.granite-constructor-wrapper select {
    /* Your custom styles here */
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
}
