/**
 * WestFace Product Menu - Additional Styles
 * 
 * Additional CSS to ensure the dynamic WordPress menu
 * works perfectly with the existing theme styles.
 */

/* ========== DYNAMIC MENU ENHANCEMENTS ========== */

/* Ensure dynamic menu maintains proper styling */
.wf-product-nav {
    position: relative;
    z-index: 10;
}

.wf-product-nav .wf-nav-list {
    /* Reset any WordPress default menu styles */
    list-style: none;
    margin: 0;
    padding: 0;
}

.wf-product-nav .wf-nav-item {
    /* Ensure menu items display correctly */
    display: inline-block;
    vertical-align: top;
}

.wf-product-nav .wf-nav-link {
    /* Reset default link styles */
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wf-product-nav .wf-nav-icon {
    /* Ensure icons maintain proper dimensions */
    max-width: 108px;
    max-height: 108px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ========== FALLBACK MENU STYLING ========== */

.wf-menu-fallback {
    border-radius: 8px;
    margin: 20px 0;
    font-family: inherit;
}

.wf-menu-fallback p {
    margin: 10px 0;
}

.wf-menu-fallback .button {
    margin-top: 10px;
}

/* ========== ADMIN ENHANCEMENTS ========== */

/* Style the custom fields in the menu admin */
.wf-menu-item-custom-fields {
    margin: 15px 0 !important;
    padding: 15px !important;
    border-radius: 5px !important;
    background: #fafafa !important;
    border: 1px solid #e1e1e1 !important;
}

.wf-menu-item-custom-fields h4 {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.wf-menu-item-custom-fields .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.wf-menu-item-custom-fields .field-custom-icon,
.wf-menu-item-custom-fields .field-custom-icon-alt {
    margin-bottom: 15px !important;
}

.wf-menu-item-custom-fields label {
    font-weight: 500 !important;
    color: #555 !important;
}

.wf-menu-item-custom-fields input[type="text"] {
    width: 100% !important;
    margin-top: 5px !important;
}

.wf-upload-icon-btn,
.wf-remove-icon-btn {
    background: #0073aa !important;
    border-color: #006799 !important;
    color: #fff !important;
    text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799 !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.wf-remove-icon-btn {
    background: #dc3232 !important;
    border-color: #ba2d2d !important;
    text-shadow: 0 -1px 1px #ba2d2d, 1px 0 1px #ba2d2d, 0 1px 1px #ba2d2d, -1px 0 1px #ba2d2d !important;
}

.wf-upload-icon-btn:hover,
.wf-upload-icon-btn:focus {
    background: #005a87 !important;
    border-color: #004c72 !important;
}

.wf-remove-icon-btn:hover,
.wf-remove-icon-btn:focus {
    background: #c62d2d !important;
    border-color: #a02828 !important;
}

.wf-icon-preview {
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
}

.wf-icon-preview img {
    display: block;
    margin: 5px auto 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========== RESPONSIVE CONSIDERATIONS ========== */

@media (max-width: 768px) {
    .wf-menu-fallback {
        padding: 15px;
        margin: 10px 0;
        font-size: 14px;
    }

    .wf-menu-item-custom-fields {
        padding: 10px !important;
    }

    .wf-upload-icon-btn,
    .wf-remove-icon-btn {
        display: block !important;
        width: 100% !important;
        margin: 5px 0 !important;
        text-align: center !important;
    }
}

/* ========== ACCESSIBILITY ENHANCEMENTS ========== */

.wf-product-nav .wf-nav-link:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

.wf-menu-fallback .button:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* Screen reader text for better accessibility */
.wf-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========== ADMIN NOTICES STYLING ========== */

.wf-menu-admin-notice {
    border-left: 4px solid #00a0d2;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.wf-menu-admin-notice h4 {
    margin: 0.5em 0;
    color: #333;
}