/* WP Markdown Export Frontend Styles */

.wpme-dropdown-container {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.wpme-dropdown-toggle {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
}

.wpme-dropdown-toggle:hover {
    background: #005a87;
}

.wpme-dropdown-toggle:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

.wpme-dropdown-icon {
    fill: currentColor;
    transition: transform 0.2s ease;
}

.wpme-dropdown-container.open .wpme-dropdown-icon {
    transform: rotate(180deg);
}

.wpme-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.wpme-dropdown-container.open .wpme-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.wpme-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wpme-dropdown-item:hover {
    background: #f5f5f5;
}

.wpme-dropdown-item:focus {
    background: #f5f5f5;
    outline: none;
}

.wpme-dropdown-item:first-child {
    border-radius: 4px 4px 0 0;
}

.wpme-dropdown-item:last-child {
    border-radius: 0 0 4px 4px;
}

.wpme-dropdown-item + .wpme-dropdown-item {
    border-top: 1px solid #eee;
}

/* Success notification */
.wpme-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.wpme-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.wpme-notification.error {
    background: #f44336;
}

/* Loading state */
.wpme-dropdown-item.loading {
    color: #999;
    cursor: not-allowed;
}

.wpme-dropdown-item.loading:hover {
    background: none;
}

/* Floating button styles */
.wpme-floating-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wpme-dropdown-container.wpme-floating .wpme-dropdown-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wpme-dropdown-container.wpme-floating .wpme-dropdown-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wpme-floating-icon {
    fill: currentColor;
}

.wpme-dropdown-container.wpme-floating .wpme-dropdown-menu {
    bottom: 100% !important;
    top: auto !important;
    right: 0 !important;
    left: auto !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    transform: translateY(5px) !important;
}

.wpme-dropdown-container.wpme-floating.open .wpme-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Content end button styles */
.wpme-content-end-button {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.wpme-content-end-button .wpme-dropdown-container {
    display: inline-block;
    margin: 0;
}

/* Theme compatibility improvements */
.wpme-dropdown-container {
    position: relative !important;
    display: inline-block !important;
    margin-left: 10px;
    vertical-align: middle;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.wpme-dropdown-toggle {
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: background-color 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* High specificity for theme override protection */
.wpme-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    min-width: 200px !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-5px) !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    line-height: normal !important;
}

.wpme-dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 8px 12px !important;
    background: none !important;
    border: none !important;
    text-align: left !important;
    font-size: 13px !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wpme-dropdown-container {
        margin-left: 5px;
    }

    .wpme-dropdown-toggle {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    .wpme-dropdown-menu {
        min-width: 180px !important;
        right: 0 !important;
        left: auto !important;
    }

    .wpme-floating-container {
        bottom: 15px;
        right: 15px;
    }

    .wpme-dropdown-container.wpme-floating .wpme-dropdown-toggle {
        width: 48px;
        height: 48px;
    }

    .wpme-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }

    .wpme-notification.show {
        transform: translateY(0);
    }
}